Look How Far You Have Come
Stop for a second. Look back. When you started this course, you didn’t know how to speak to a computer. Now? You are a wizard.
Your Toolkit
Here is what you have unlocked:
- Commands:
print("Hello")to speak. - Variables:
score = 10to remember. - Input:
name = input()to listen. - Decisions:
if age > 10:to think. - Loops:
for i in range(5):to work hard. - Debugging: Fixing red text without panicking.
- Types: Knowing your Strings from your Integers.
- Lists:
["Sam", "Alex"]to collect treasures. - Functions:
def my_spell():to invent your own commands.
That is not just “learning”. That is obtaining a superpower.
The Final Challenge (The Quiz)
Can you get 3 out of 3?
1. How do you ask the user for their name?
- A)
print("What is your name?") - B)
input("What is your name?") - C)
ask("name")
2. Which list is correct?
- A)
colors = "Red", "Blue" - B)
colors = ["Red", "Blue"] - C)
colors = (Red, Blue)
3. If x = 5, what does x == 10 give us?
- A)
True - B)
False - C)
510
(Answers: 1:B, 2:B, 3:B)
Where to Go Next?
You have the basics. Now you need to build.
- Build a text adventure game (“You see a dragon. Fight or Run?”).
- Build a calculator.
- Build a quiz for your friends.
Don’t copy code. Invent code.
A Secret for You
The best programmers in the world—the ones at Google and NASA? They look up answers on the internet every single day. They make mistakes every single day.
The only difference between a beginner and a master is that the master has failed more times than the beginner has tried.
Go forth and code. You are ready.
This post is part of the Python Basics for Kids series, based on “Python for Kids from 8 to 88”.