Question: Write a program that returns whether an input number is divisible by: 2,3,5,7, 11, 13, 17 Note that there isn't a simple range function that
Write a program that returns whether an input number is divisible by: 2,3,5,7, 11, 13, 17 Note that there isn't a simple range function that will give you this list of numbers. However, a List will. You can define a list f = [2, 3, 5, 7, 11, 13, 17] and then use "for i in f;" But you don't necessarily even need a list and a for loop. You'll read a number (using input, 60 in this example), convert it to an integer, and then print: Input number: 60 Factor by 2: True Factor by 3: True Factor by 5: True Factor by 7: False Factor by 11: False Factor by 13: False Factor by 17: False Rennected files
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
