def func1(a,b):
c = a * b
print c
return c
def func2(a,b):
c = a * b
print c
return c
def func3(a,b):
c = a * b
print c
return c
four = "F"
nine = "N"
sixteen = "S"
print "Enter F,N,or S for your choice."
answer = raw_input("Enter the letter of your choice:")
while answer != four or nine or sixteen:
if answer == four:
result = func1(2,2)
elif answer == nine:
result = func2(3,3)
elif answer == sixteen:
result = func3(4,4)
else:
"Wrong choice.Enter again."
My code is straight-forward. The problem starts to occur when I run the "raw_input" part of the program. It does print "Enter F,N,or S for your choice.", and then "Enter the letter of your choice:". But, when I enter either "F","N",or "S", the print statement disappears along with the raw_input line, and the kernel shows that is busy, but it does not show any output. I don't know what is going on.
Also, I am trying to loop and ask the user again to enter the choice if they put something else other than "F","N",or "S". Please, make sure if that is correct or not because I think there is a problem, but I can't figure out what unless my program shows results.