Madlibs Part 3

Setting up additional inputs

Now that we understand the basics of how to use inputs, we can set up a couple of more

For our game of ‘Madlibs’, we will need an input for each of the following categories:name,noun,adjective,verb, and adverb

These inputs will all be set up using the same code, the only different will be the way we name our variable, and what question the input is going to ask for

Once the variables have been set up, we can combine them together into one print function. This will give us that ‘Madlibs’ effect.

Below our variables, add the following code ‘print(name1 + “is a ” + adj1 + ” ” + noun1 + “.”)’

Our next line of code will incorporate those two missing variables, the verb and adverb. Add in the following code.

When we test this code, two strings should show up in our terminal, after we have completed entering our inputs. Double check to see if you missed any spaces.