User Tools

Site Tools


timemath

This is an old revision of the document!


Table of Contents

Time and Math

Time

isEven

def main():
    a = 5

    if iseven(a):
        print(f"{a} is even.")
    else:
        print(f"{a} is odd.")

def iseven(a):
    return True

if __name__ == "__main__":
    main()

We'll start by fixing this. Then, we'll make a function that tests if a number is prime. Then we will try to generate the first million prime numbers. But, quickly!

timemath.1743919047.txt.gz · Last modified: 2025/04/06 05:57 by appledog

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki