I recently tried to make a calculator in Python but the options that I am trying to make with the if statement is not working, if you could pleas tell me what is wrong I would appreciate it, the code is below as follow. Yes I know there is typos I just was needing some help on why this if statement is not working because I have used them before and it worked
#Calculator Testing in Pytho 2.7
f == raw_input("""What function would you like to use?
You can type Opt to see the options"""
if f == "Opt":
print
"""You can choose from the following options when at the
function selection screen;
Type /Add for Addition
Type /Sub for Subtraction
Type /Div for Division
Type /Multi for Multiplication
Type /menu to go back to the function selection screen
or
Type /quit any time to end the program"""
if f == "no":
print "test"
funcopt = raw_input("What would you to do?")
if funcopt == "/quit":
print "test"
Aucun commentaire:
Enregistrer un commentaire