Share your repls and programming experiences

← Back to all posts
random mad libs
ili1178 (0)

i know it's very easy to code but it's funny ;)

Comments
hotnewtop
LukeWright (287)

You should try using f-strings! instead of

print("\nToday I went to the " + gibberish1 + " zoo. I first went to the " + animal1 + " exhibit and saw a zookeeper grooming the " + animal1 + " with a " + object1 + " . I watched it for a while and got bored so I went to the " + animal4 + " pool. It was " + adverb1 + " " + verb_ing2 + " in the water and I was lounging at the side when it suddenly started " + verb_ing4 + " up at me. I was feeling hungry, so I decided to get " + food1 + ". It cost " + number1 + " " + animal3 + "bucks! I was eating the " + adjective1 + " " + food1 + " when a " + animal2 + " came " + verb_ing1 + " up to me and stole the " + food1 + "! I was ready to go home when a " + animal5 + " " + verb_ed1 + " up to me and " + verb_ed2 + " me on the " + body_part + "! The day surely wasn't boring!")

, you could do

print(f"\nToday I went to the {gibberish1} zoo. I first went to the {animal1} exhibit and saw a zookeeper grooming the {animal1} with a {object1} . I watched it for a while and got bored so I went to the {animal4} pool. It was {adverb1} {verb_ing2} in the water and I was lounging at the side when it suddenly started {verb_ing4} up at me. I was feeling hungry, so I decided to get {food1}. It cost {number1} {animal3}bucks! I was eating the {adjective1} {food1} when a {animal2} came {verb_ing1} up to me and stole the {food1}! I was ready to go home when a {animal5} {verb_ed1} up to me and {verb_ed2} me on the {body_part}! The day surely wasn't boring!")

Using f-strings make everything simpler and easier to code!