Maybe 3 months ago I tried out a couple beginners tuts for python. I stopped experimenting for awhile and now I want to try and learn more about python. So I am trying to create a calculator program to refresh my knowledge. Ran into a problem early in the code since when I press 1 nothing happens..... can anyone help or suggest anything?
Code:print "Welcome to Nolls's Calculator 1.0"
option=input
print input("Which of the following would you like to do?")
print "1. addition"
print "2. subtraction"
print "3. multiplication"
print "4. division"
if option==1:
def add(a,b):
print a + b
a=input("First number")
print a
b=input("Second number")
print b
print add


LinkBack URL
About LinkBacks




Reply With Quote
)


Bookmarks
Algorithms and Data Structures
Java tutorials
Algorithms Forum