•  
      tasks #43031 Python program to a number is Prime or not
    #43031
    Ritish Singh (ritish31)
    2022-07-29 10:16
    2022-07-29 10:16
    Details
    Python program to a number is Prime or not
    In this program, we have checked if num is prime or not. Numbers less than or equal to 1 are not prime numbers. Hence, we only proceed if the num is greater than 1.
    We check if num is exactly divisible by any number from 2 to num - 1. If we find a factor in that range, the number is not prime, so we set flag to True and break out of the loop.
    Outside the loop, we check if flag is True or False.
    If it is True, num is not a prime number.
    If it is False, num is a prime number.
    5 - Medium
    State of Progress
    2022-05-02
    100
    2022-05-03
    Ritish Singh (ritish31)
    Rakesh Kumar Verma (rakesh.verma)
    2022-05-03
    Closed
    Attachments
    References
    References list is empty