Daily · June 16, 2023

Cool Mad Libs Simple Casino Python Game!

print("Welcome to the Mad Libs Casino! Please pay a coin to play.") # welcoming user
ask = input("Do you want to play: Reply with yes, or no.")
if ask == "no":
    print("Then why did you run this program in the first place? You're still\n going to play.")
if ask == "yes":
    name = "" # last few lines will be filled later
adjective = ""
favouriteSnack = ""
number = ""
activity = ""
creature = ""
verb = ""
adjective2 = ""
Name = input("Give a name: ") #user input
Adj = input("Give an adjective: ")
FavSnack = input("Give a food: ")
Number = input("Give a number: ")
Fun = input("Give an activity you enjoy: ")
Adj2 = input("Give another adjective: ")
name == Name
adjective == Adj
favouriteSnack == FavSnack
number == Number
activity == Fun
adjective2 == Adj2  #input the user's input

sillyStory = f""" #print on different lines

Hello, today I went to {Name} Forest.
After a few hours, I took a break and ate some {Adj} {FavSnack}.
I rested for {Number} more seconds after that.
After my break, I planned to {Fun} for a while. But then,
my day was ruined when my leftover
{FavSnack} disappeared!
I ended up having a {Adj2} day at the {Name} Forest.
Do you want to help me figure out how my {FavSnack} disappeared?
If yes, then play again to know!

"""
print(sillyStory) #print the finished story

You can copy and paste this code in Python if you’d like.

If you would like to understand it, you can search some websites and read some books or use the comments.

This story is about you, who journeys into a forest. You eat a snack. Then, it disappears!