Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
672 B
1
Indexable
Never
"""
This script checks for prime numbers between 0 and 99.
"""

import math

def is_prime(number):
    """
    Check if a number is prime.
    
    Args:
        number (int): The number to check for primality.
    
    Returns:
        bool: True if the number is prime, False otherwise.
    """

    if number <= 1:
        return False
    for i in range(2,int(math.sqrt(number) + 1)):
        if number % i == 0:
            return False
    return True

def main():

    """holds all the main logic"""

    for i in range(100):
        if is_prime(i):
            print (i, end=' ')
    print()

if __name__ == '__main__':
    main()