promblem 1. after the game plays, it wont return to menu instead it exits..
problem 2. In the yourAge(), and wish() funtion, is there a way i can randomize the output??
problem 3. I have downloaded pygames i cant get it to work..anyhelp on that would help as well.
def main():
option = 0
tries = 0
getmonth = 0
while option !=5:
option = choice()
if option == 1:
yourAge()
stop = raw_input('Press ENTER to continue.')
return choice
exit()
elif option == 2:
dog()
stop = raw_input('Press ENTER to continue.')
return choice
exit()
elif option == 3:
main1()
stop = raw_input('Press ENTER to continue.')
return choice
elif option == 4:
random()
return choice
exit()
elif option == 5:
exit()
def choice():
print "\n"*30
print 'iii iii ii ii ii iiiiii ii ii'
print 'ii i i ii i i ii ii i ii ii'
print 'ii ii ii iiiiii ii ii iiiiii ii ii'
print 'ii ii ii ii ii ii ii i ii ii'
print 'ii ii ii ii iiiiii ii iiiiii iiii productionz version 1.0'
print
print '1: Fortune'
print '2: Find out how old you are in dog years '
print '3: Make a wish '
print '4: Guess the number im thinking of.. '
print '5: Exit'
print
option = input('What would you like to do today enter 1-5: ')
return option
def yourAge():
print "\n"*30
print 'iii iii ii ii ii iiiiii ii ii'
print 'ii i i ii i i ii ii i ii ii'
print 'ii ii ii iiiiii ii ii iiiiii ii ii'
print 'ii ii ii ii ii ii ii i ii ii'
print 'ii ii ii ii iiiiii ii iiiiii iiii productionz version 1.0'
print
print '\tWelcome to the fortune teller'
print
name = raw_input('Enter your name! ')
print
age = input('Enter your age! ')
print
if age <= 5:
print name,' Your to young for a furtune, come back in 3 years!!'
elif age <= 10:
print name,'Something, great is going to happen soon!!'
elif age <= 13:
print name,'Your at the age now where your going to'
print 'start notice change in your life!! This will not be a bad change,'
print 'but remember your family will be there for you.'
elif age <= 15:
print name,'You have taken intrest in a guy/girl. '
print 'Dont be afraid to talk to him/her. They have been checking you out too.'
elif age <= 17:
print name,' You are getting older and wiser, now is the time to invest'
print 'in something that you have wanted to in the past.'
elif age <= 21:
print name,'Your 5 lucky lotto numbers are 15, 2, 31, 17, 22!'
print 'Use these number on the next 5 lotto tickets you buy.'
elif age <= 23:
print name,'Beer is a good thing, loosen up, live life!! I see'
print 'good things comming for you in the future.'
elif age <= 25:
print name,'People are starting to notice the things you do.'
print 'You may have made a few mistakes but focus on the good!'
elif age <= 27:
print name,'Something, great is going to happen soon!!'
elif age <= 30:
print name,'Your going to die in 1 week!!'
elif age <= 32:
print name,'Every one needs to laugh. Go out and do something eventurous this weekend...'
elif age <= 35:
print name,'Things people dont know wont hurt them. So if they dont ask dont'
print 'tell.'
elif age <= 40:
print name,'Lucky lotto numbers are 17, 1, 52, 20, 30!! Play these numbers'
print ' for the next month....'
elif age <= 43:
print name,'People make mistakes. Dont get frustrated with life because'
print 'things will get better for you.'
return option
elif age <= 50:
print name,'Enjoy life retirement is comming up!!'
elif age <= 60:
print name,'Keep playing the lotto, The number you have been getting will hit soon!!'
else:
print ' Your either already dead or going to die!!!'
stop = raw_input('Press ENTER to continue.')
return
def dog():
print "\n"*30
print 'iii iii ii ii ii iiiiii ii ii'
print 'ii i i ii i i ii ii i ii ii'
print 'ii ii ii iiiiii ii ii iiiiii ii ii'
print 'ii ii ii ii ii ii ii i ii ii'
print 'ii ii ii ii iiiiii ii iiiiii iiii productionz version 1.0'
print
print'\tHow old are you in dog years???'
print
name = raw_input('Enter your name! ')
print
age = input('Enter your age! ')
age = age * 7
print
print name,'is',age,'dog years old'
return
def main1():
getmonth = 0
while getmonth !=12:
getmonth = wish()
if getmonth == 1:
January()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 2:
February()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 3:
March()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 4:
April()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 5:
May()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 6:
June()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 7:
July()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 8:
August()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 9:
September()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 10:
October()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 11:
November()
stop = raw_input('Press ENTER to continue.')
exit()
elif getmonth == 12:
December()
stop = raw_input('Press ENTER to continue.')
exit()
def wish():
print "\n"*30
print 'iii iii ii ii ii iiiiii ii ii'
print 'ii i i ii i i ii ii i ii ii'
print 'ii ii ii iiiiii ii ii iiiiii ii ii'
print 'ii ii ii ii ii ii ii i ii ii'
print 'ii ii ii ii iiiiii ii iiiiii iiii productionz version 1.0'
print
print 'If you wish for something it may come true in the near furture.'
print 'If you think it wont then most likely it will not come true.'
print
name = raw_input('Enter your name! ')
print "\n"*5
wish = raw_input('Enter your wish! I wish:')
print
print '1: January'
print '2: February '
print '3: March '
print '4: April '
print '5: May'
print '6: June'
print '7: July'
print '8: August'
print '9: September'
print '10:October'
print '11:November'
print '12:December'
print
getmonth = input('Enter 1-12 on the month you would like your wish to come true: ')
return getmonth
def January():
print
print 'Your wish is looking good pick another month.'
def February():
print
print 'In the next couple of weeks mention it to a higher figure.'
def March():
print
print 'This month you should get your wish but dont be gready.'
def April():
print
print 'I think your pushing it, wish for something else on this month.'
def May():
print
print 'You have already been told this is an impossible wish.'
def June():
print
print 'If you think about it long enough your wish will come true.'
def July():
print
print 'Enjoy the fireworks this month, Your wish will come in January.'
def August():
print
print 'You have wished to many times try again later.'
def September():
print
print 'Wish again something for your family and pick another month.'
def October():
print
print 'October is a good month, Dont get spooked at the haunted houses.'
print 'this year and your wish will come true.'
def November():
print
print 'In the next couple of weeks mention it to a higher figure.'
def December():
print
print 'Christmas is around the corner, make more wishies in this month.'
def random():
import random
print "\n"*30
print 'iii iii ii ii ii iiiiii ii ii'
print 'ii i i ii i i ii ii i ii ii'
print 'ii ii ii iiiiii ii ii iiiiii ii ii'
print 'ii ii ii ii ii ii ii i ii ii'
print 'ii ii ii ii iiiiii ii iiiiii iiii productionz version 1.0'
print "\tWelcome to 'Guess my number!:"
print "\n"*1
print "\nI'm thinking of a number between 1 and 100."
print "Try to guess it in as few attempts as possible.\n"
print 'You will only have 6 tries, so guess wisley'
the_number = random.randrange(1,101)
tries = 0
while True:
print
guess = int(raw_input("Take a guess: "))
tries += 1
if guess > the_number:
print "Lower..."
elif guess < the_number:
print "Higher..."
else:
print "You guessed it! The number was", the_number
print "And it only took you", tries, "tries!\n"
stop = raw_input('Press ENTER to continue.')
return
if tries == 6:
print "You have made 6 attempts, game over."
stop = raw_input('Press ENTER to continue.')
return
main()

New Topic/Question
Reply



MultiQuote





|