This Mad Libs word game programmed with Python serves as a great example of the various scenarios that can be programmed with Python. The game initializes by prompting the player to choose between 5 different options – “Play an Economic Mad Lib”, “Play a Scientific Mad Lib”, “Play a Musical Mad Lib”, “Have the Computer Randomly Generate a Mad Lib”, and “Exit the Game”. If options 1-3 are selected by the user, the user is prompted to enter substitute words into blank spaces scattered throughout the template. Once values have been inputted for all the blank spaces in the template, a completed story will be presented to the user. The user is then asked whether they would like to play again or exit the game. If the user selects option 4 the computer is prompted to completely automate the process of selecting and completing a Mad Lib by inputting random elements located in lists of word banks. Option 5 allows the user to exit the program. Techniques showcased in the app include proper implementation of user defined functions, while loops, importing and implementing various Python functions, modules, and f-strings just to name a few key programming aspects incorporated into game design.
brentjand/python-scenarios
A game of randomization, choice, and filling in the blank. My final project in the Nucamp Back End Bootcamp.
Python