Skip to content

Not enough ways to determine if a number is even #1

@KernelDeimos

Description

@KernelDeimos

The IsEven built-in function currently takes 1 parameter (the number) and returns the probability as a number from 1 to 100 that the number is even.

There should be a 2nd parameter which specifies the algorithm for deciding if a number is even. For example, a value of guess would use the current behaviour, ask would ask the user if the value is an even number (requesting y/n on stdout), table would use a lookup table of even numbers, etc...

Contributions to add these functionalities are welcome. Comments with Go source code on this thread as well as pull requests for integers.go will be accepted.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions