Save this video free

Python (Fall 2026) Module 2-11: A2 Explanation (Using online-python.com)

Bill Moseley, Ph.D. - Computer Science Educator · 14:49 · Watch on YouTube

Part of Bakersfield College COMP B10. See all 47 lectures and search them

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Bill Moseley explains Assignment A2, a Python Mad Libs program that collects roughly four or five user inputs, cleans them with methods such as strip(), and inserts them into a story using an f-string or str.format(). He demonstrates multiline strings in online-python.com, suggests using an AI-generated story as an optional template, and shows students how to download and submit the correctly named a2.py file.

Key takeaways

Chapters

0:00 Collecting Inputs and Formatting a Multiline Story in Python
4:50 Building a Mad Lib from a Template or AI-Generated Story
10:57 Saving the Online Python Program as a2.py

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:00 So, A2. In A2 we are doing what are called Mad  Libs. I don't know if you know what a Mad Libs is, but it's a tool for teaching kids the parts  of speech. So it's typically a little story that has a bunch of underlines in it. Things like  adjective, a noun, a food, part of your body. And little kids have a lot of fun filling in silly  words. And about half of all Mad Libs are filled in with things like poop and fart and, like, you  know, because kids, right? I see you have the same sense of humor I do. So the point is you're  teaching kids the difference between like a noun and a verb and things like that. But this is  a great opportunity for us to practice using

0:56 string format or f-strings. And I'm okay with you  using either method. If you want to play around with string format, you can. If you want to use an  f-string, you can use an f-string. But basically, what I want you to do is I want you to get four  or five inputs from the user, put those into variables, and then insert those into text. Okay?  So what that's going to look like, and I'll do it first in, now let's go straight to online Python.  So I'm going to, in online Python here, I'm going to delete that program and I'm going to start by  getting a few inputs. I'm going to say strName equals input.

1:52 What is your name? And of  course I'm going to strip that. And then I'll say strAge, put what is your age, dot strip. And input. Where do you go to? Now, I'm not giving you an actual Mad  Libs yet. I'm just showing you sort

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

In this course

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Bill Moseley, Ph.D. - Computer Science Educator.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.