As homework, I am to write a scrip that can determine if one integer is factor of another. I define the input x and y as follow;
For some reason the program only interprets up to the input parts and left the rest out. That is, when I run the program in shell, it prompts me to enter the integers and stop there. Can any body tell me why? your help will be greatly appreciated. Thank you very much.
Code:
def main():
x = input ("What is the integer? ")
y = input ("Enter another integer: ")
def isfactor (x, y):
if x % y == 0:
print y, "is a factor of x."
else:
print y, "is not a factor x."
main()
Comment