I can’t seem to get this program to work, and I’m pretty sure it has something to do with either my input or maybe I’m not casting the string to int properly. I fully understand range and if statements, to the point where I jumped ahead to step 11 and answered it correctly the first time, but my output when I program it is incorrect. No matter what number I input, it will print
Repeating over and over again. My code looks like this:
number = input("Pick a number to see if it is divisible by two or three: ")
number = int(number)
for number in range (0,41):
if number % 3 == 0:
if number % 7 == 0:
I haven’t really been stuck until now, so I feel like I must be overlooking something simple. Any help would be greatly appreciated!