Learn Python Thru Stories


“Some amazing things go on in there, don’t they?” asked Mom as she watched Abigail peering into a window of the STEM clubhouse.

“Sure do. I wish I could help other kids like Anna and Andre and the other kids in the STEM club,” sighed Abigail.

“What’s the matter?  Did they tell you that you can’t come in?” Mom questioned.

“Oh, I’m allowed to come in.  It’s just that when I get inside, they tell me that I’m too little to help.  That I’ll hurt myself.  All they do is let me watch and every once in a while, they’ll let me hand them something. But that’s not enough. I want to build and create things to help other kids like they do.” Abigail said.

My sister Annaliese started the STEM Club years ago, and since then the club has helped many kids with problems they have.  The club was constantly building and making things.  

“Don’t worry Honey.  You may be too young to work with certain tools, but you’re not too young to help others.  Ask the Lord how you can use the gifts he’s given you to help other people.  And in the meantime, be thankful that they let you watch.  You can learn so much by watching and asking questions.”  Mom said.

“Hey, look who it is.  It’s Abigail.  How are you doing today?” Marie asked as I entered the clubhouse.

“Oh, I’m fine.  What are you guys working on?  Anything I can help with?” I asked.

“Well maybe you can.  We are constantly receiving letters from other kids asking us to help them.  It has become extremely hard to keep track of all of the kids who want our help.  We’re not sure of the best way to organize all of this, and we’d hate to lose someone’s letter,” Anna, my sister said.


“Hmm…I may have a solution to your problem.  Maybe you should build an app.  Kids could use the app to communicate with you all.  It could be a place where you all could provide STEM lessons for other kids who wanted to learn how to be engineers as well, and a place where kids could play games as they practiced being engineers,” Mom said excitedly.

“An app.  How are we going to do that?  I have been told that a lot of what we do is mechanical engineering, but none of us know anything about software engineering.  We aren’t coders,” Andre said.

“It just so happens that years ago I learned how to program.  I haven’t programmed in a while, but I think I know enough to get you all started.  Then we can continue to learn together. Abigail would you be interested in learning how to code too? ” Mom asked.

“I sure would,” I said.

“Great!  We start tomorrow morning.  Everyone bring their laptops,” Mom said as she smiled.

And so another adventure started, and I was apart of it!

“Marie, can you tell us about some of the basic data types in Python?” my mom asked.

Mom was teaching us the computer language of Python.

“Umm, strings and integers,” Marie said uncertainly.

“Ok, yes, can anyone tell me the other two data types we talked about yesterday?” Mom asked.

“Floats and booleans,” I shouted out enthusiastically.  “The four data types you taught us yesterday were strings, integers, floats, and booleans.”

“Great, Abigail.  Can someone give us examples of each type?” Mom asked.

“Strings are anything in quotes, whether they are words, numbers, or characters.  So for example ‘hi’ is a string, ‘My name is Abigail.’ is a string, and even ‘7’ is a string.  Examples of integers are 0, 5, -3, 100.  Examples of floats are 1.5, 20.2, -0.25, and booleans are True and False.  And they MUST begin with a capital T or capital F,” I rattled off.

The rest of the STEM club members looked at me astonished.  

“How did you remember ALL of that from just one lesson Abigail,” Annaliese asked me as she looked dumbfounded.  

“As Mom was teaching yesterday, I drew some pictures to help me remember what she said.  Then later that evening I colored the pictures and the lesson stuck!” I said grinning.

“See here is one of my pictures.  I drew a picture of a cartoon character TYPE, and in my drawing other cartoons are lined up and TYPE is telling each one of them what they are.  See here, he’s telling the cartoon 5 that he’s an integer.  This helps me remember that I can use the type function to get the computer to tell me what data type I have,” I said as I showed the other kids my drawing from yesterday.

“What did you draw to help you remember how to create a valid variable name?” Andre asked me.

“Ok, so I drew a factory scene with variable names coming down the conveyor belt.  Variable names like 19age, and age*, and age$ have a REJECT stamped on them while the variable name age, and age19, and age_19 have accept stamped on them.  So that helps me to remember to NOT to start a variable name with a number and NOT to include characters such as * and $.  On the other hand I know that  I CAN include the underscore and numbers, but that the variable can’t start with a number.” I said.

“Ooh, I have an idea. I can draw a refrigerator with the word VARIABLE on the freezer part, to help me to remember that we create variables to STORE information that we want to be able to recall later,” Bella said excitedly.

“I’m going to draw the print function as a cartoon with big hands who likes to hold stuff.  His hands are parentheses.  This will help me to remember that if I use the print function, I need to use parentheses,” Tommy said.

“So for our next programming lesson, everyone remember to bring crayons, markers, and paint,” Mom said energetically.  

Notes from Mom:

  1. If you want to make a comment, first put a hashtag sign.
  2. Be able to determine between an integer, float, string, and boolean data type.  An integer are the whole numbers {0,1,2,3,4,….} and their opposites so the set of integers are {….,-5, -4, -3, -2, -1, 0, 1, 2, 3,…..}.  
  3. Remember, when dealing with a string, use quotes.  You can use either single or double quotes.
  4. Python is case sensitive.  So for example the string “Hi” is NOT equal to the string “HI”
  5. You can use the print function to output something.  Don’t forget to use parenthesis.
  6. You can use the type function if we want to determine the data type of something.  
  7. We can create a variable if we want to store information to be recalled later.
  8. We can add strings together using string concatenation.




Recent Posts

Leave a Comment