From the course: Introduction to Python: Learn How to Program Today with Python by Pearson
Unlock this course with a free trial
Join today to access over 25,400 courses taught by industry experts.
Write a Mad Libs program - Python Tutorial
From the course: Introduction to Python: Learn How to Program Today with Python by Pearson
Write a Mad Libs program
Okay, so this is one of the lessons where we pause the learning and try to just use what we've learned to build a little game or program. So this one is going to be a Mad Libs program. If you don't know what Mad Libs are, basically it's a little story or text or poem where there are some parts of it that are blank and the user is prompted to give their input and like say pick an animal and then it gets printed out afterwards with their input. So we're gonna do this classic little poem here, roses are blank, violets are blue, sugar is blank and so are you. So you can open up challenge, challenge2madlibs.py. Actually, it should say challenges. So I'll fix that. Challenges, challenge2, madlibs.py. And I've got the text here with curly brackets to show what you're trying to ask from the user. And then a couple of to-do messages for what you need to do. OK, so you can pause the video and work on this right now. All right, let's look at this. Madlibs prompt the user to provide the missing…
Contents
-
-
-
-
(Locked)
Learning objectives51s
-
(Locked)
Learn about types6m 35s
-
(Locked)
Work with variables14m 9s
-
(Locked)
Debug errors15m 44s
-
(Locked)
Manipulate strings13m 10s
-
(Locked)
Write a Mad Libs program7m 14s
-
(Locked)
Use modules16m 32s
-
(Locked)
Write your own functions16m 7s
-
(Locked)
Write a timer game12m 19s
-
(Locked)
More context: Learn about Python11m 9s
-
(Locked)
-
-
-
-
-
-