[Tutor] Program Questions

mandy bowen leomandy at hotmail.com
Fri Jul 16 00:25:42 CEST 2004


I just tried a few of the suggestions I received here, but I still get an 
invalid syntax error when I try to run the program in this section:

                  def MenuOption(self, option, Account):
                                if option == 1:
			print ‘\n’
			Account.deposit(input(“Deposit amount: $”))
			print ‘\n’
			print ‘TRANSACTION COMPLETED’
			print ‘\n’
		elif option == 2:
			print ‘\n’
			Account.withdraw(input(“Withdraw amount: $”))
			print ‘\n’
			print ‘TRANSACTION COMPLETED’
			print ‘\n’
		elif option == 3:
			print ‘\n’
			Account.trans()
			print ‘\n’
			print ‘QUERY COMPLETED’
			print ‘\n’

The error says that the invalid syntax is in the print command!  If I take 
all of those print statements out, it tells me the invalid syntax is the 
elif???  What is going on here?  I'm new to Python, but I know elif is 
supposed to be valid...

_________________________________________________________________
Check out the latest news, polls and tools in the MSN 2004 Election Guide! 
http://special.msn.com/msn/election2004.armx



More information about the Tutor mailing list