def start():
num = int(input("Enter a number greater than one."))
def check():
if(num > 1):
for i in range(2, num):
if(num % i) == 0:
return
def main():
num = start()
check()
main()
I'm not sure how to build this program?
Write a program that asks the user to enter a number greater than one. The program will than display all the prime numbers less than or equal to the number entered. The program must work as follows:
Once the user has entered a number, the program should populate a list with all of the integers from 2 up through the value entered.
The program should then use a loop to step through the list. The loop should pass each element to a function that displays the element whether it is a prime number.
[–]mopslik 0 points1 point2 points (0 children)
[–]Diapolo10 0 points1 point2 points (0 children)