Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Name: James Inglis
- # Course: Robotics Programming
- # Professor: Ms.Stockbridge
- # Date: 9/30/14
- # Description: This program simulates an opening of a fortune cookie.
- # picks randomly 1 out of the five fortunes everytime the program
- # the program is running.
- #
- import random
- num = random.randint(1, 5)
- if num == 1:
- string_1 = "Now is the time to try something new."
- print("Here is your fortune: ", string_1)
- elif num == 2:
- string_2 = "The great joy in life is doing what people say you cannot do."
- print("Here is your fortune: ", string_2)
- elif num == 3:
- string_3 = "You will find a treasure at this web site."
- print("Here is your fortune: ", string_3)
- elif num == 4:
- string_4 = "Your dearest wish will come true."
- print("Here is your fortune: ", string_4)
- else:
- string_5 = "You will have a fine capacity for the enjoyment of life."
- print("Here is your fortune: ", string_5)
- input("\n\nPress any key to continue!")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement