Popular Posts

Tuesday, August 18, 2020

Python Beginner: Mad Libs Game

 Hello, Developer! :)


Hope you're fine today for Python coding! 

Today, we will code "Mad Libs Game". This is a kind of word game to input requested words into the blank in the sentences. This game seems like the following screenshot from the Wikipedia(https://en.wikipedia.org/wiki/Mad_Libs)

I input below codes and showed executed result as following screenshot.

color = input("Enter a color: ")
plural_noun = input("Enter a Plural Noun: ")
celebrity = input("Enter a celebrity: ")

print("Roses are " + color)
print(plural_noun + " are blue")
print("I love " + celebrity)


Can you see the same result? Great! You can apply this format for a simple survey program.

See you next post, developer! :)

No comments:

Post a Comment

Python - Web crawling exercises

Hello Python developer! How are you? Hope you've been good and had wonderful time with Python. There are 10 Python requests module exerc...