hi im new to python and programming, and I have just learned loop and nesting statements.
I dont understand how to create functions and all that.
could anyone come with some good suggestions to make my crappy script better?
here is my script:
print 'choose option'
print 'a) fortune telling'
print 'b) quit'
while True:
option=raw_input('enter option: ')
if option == 'a':break
if option == 'quit':quit()
while True:
fortune=raw_input('enter a number from 1-3')
if fortune == '1':
print 'you will have a great life,\nbut you might get in trouble with the law'
elif fortune == '2':
print 'you will marry a wife that wants to kill you,\nand she was a guy'
elif fortune == '3':
print 'you will live a peacefull life with no trouble'
elif fortune == 'b':quit()
else:
print 'thats cant be right!'