For this Project, we will be coding our own version of the popular game “Madlibs”!
In order to do this, we will need to introduce a new function. The print() function will print out any string you give to it in parentheses.
On line 2, add in print(“Hello World”)
Run the Program, and look for the text to print out in the Terminal (Bottom of the Screen)/p>
Now, let’s add on an additional print function. On the next line, add in ‘print(“Hello, my name is John Smith”)’ You can substitute in your own name if you want
With a basic understanding of print functions, we can start to add in variables. on Line 8, add the code ‘myName = “John Smith”‘ Feel free to swap in your own name
On Line 9, we can incorporate the variable into a print function. add in the code ‘print(“Hello, my name is ” + myName)’
Test the code, and make sure that the print function is using whatever name is set for the myName variable. If you change what the variable is “equals” to, it should reflect in our output
Remeber, the Output for our program will show up at the bottom of the screen, inside of the Terminal window