Lesson 17: What's Next: Stepping into Python 3 Programming


What you'll learn in this lesson


What you can do now

Sixteen lessons ago, you had never written a line of code. Now you can do all of this — and you should pause and notice that, because it is a lot:

Run this recap program. Every line uses something from this course, and nothing else:

name = "Coder"
score = 0
for round in range(3):
    score = score + 10
    print(name + " has " + str(score) + " points.")
if score >= 30:
    print("Finished!")

Output:

Coder has 10 points.
Coder has 20 points.
Coder has 30 points.
Finished!

If you can read that program line by line and say what each part does, you have genuinely learned the foundations — not memorized them, but understood them well enough to read real code.


Stepping into Python 3 Programming

This course was designed as the on-ramp to Dante's Python 3 Programming course, and the step is deliberately smooth. You already know its opening ground: setup, IDLE, printing, variables, numbers, strings, comparisons, decisions, and loops. Its opening lessons will therefore move faster for you than for someone starting cold — you will recognize the ideas and spend your energy on the new material instead of the setup.

The new material waiting there includes:

None of that requires anything you do not already have. The guessing game's while loop, the Turtle program's loop-drawn square, and the dictionary's labeled entries are the same thinking those bigger topics are built from — just applied to larger problems.


How to keep learning

Three habits will carry you further than any single course:

  1. Change working programs. Take the guessing game and alter one thing at a time. Every change teaches something, and a working starting point means you always know what "correct" looks like.
  2. Read error messages. They point at the exact problem, and learning to read them is half of learning to program. Never fear them — they are the computer helping you.
  3. Build small things often. A calculator, a quiz game, a to-do list, a Turtle drawing — small finished programs beat big unfinished ones, every time. Finish, then start the next one.

If you ever feel stuck, go back one lesson, not back to the start. The foundations stack: a wobble in one layer is fixed by revisiting that layer, not by rebuilding the whole tower.


Hands-on exercise

  1. Run the recap program above and explain each line out loud, in your own words.
  2. Extend it: add a dictionary holding your name and score, and print a final message built from it.
  3. Write down the first thing you want to build next — a game, a tool, or a drawing — and which lessons' ideas it will need.
  4. Open the Python 3 Programming course and read its first lesson. Mark every idea you already recognize. Notice how many there are.

Quick quiz

  1. List three things you can now do that you could not do at the start of this course.
  2. Why will the opening lessons of Python 3 Programming move faster for you than for a cold starter?
  3. Name the three new areas waiting in Python 3 Programming, and say in one line what each is about.
  4. Why is changing a working program a better way to learn than starting from a blank page?
  5. If you feel stuck on a new topic, what should you revisit — and what should you not do?

Answer key: 1. Any three from the recap list, for example: save and run program files, use loops, build a complete game. 2. Because you already know its opening ground — setup, IDLE, variables, strings, decisions, and loops — so your energy goes to the new material. 3. Files (programs remembering things between runs); object-oriented programming (bundling data and code into objects); networking (programs talking to other computers). 4. Because a working starting point shows what "correct" looks like, and each small change teaches one thing. 5. Revisit the one layer you wobbled on — do not rebuild from the start.


Key takeaways

Course complete — see you in Python 3 Programming.


Slides

Work through the slides with Helio's narration, or download them:

Open the slidesDownload PowerPointDownload PDF

Try it yourself

Run the lesson's example with real Python, right in your browser (Python loads from the internet, so you need to be online).

Open the demo

Practice file

Download lesson17-practice.pyDownload the solution

# Lesson 17: What's Next — Stepping into Python 3
# WHAT TO DO: This recap program uses only ideas from this course:
# variables, a for loop, an if, and a dictionary. The dictionary at
# line 20 holds the player's name and final score, but the last line
# is unfinished. Fill in line 21: replace the placeholder with a final
# message built from the dictionary, for example:
#     print(player["name"] + " finished with " + str(player["score"]) + " points.")
# HINT: str() turns the score number into text so it can join the
# message with +. Only change the placeholder line.
# Run with F5 in IDLE. You are done when the last line is a real
# final message, not a placeholder.

name = "Coder"
score = 0
for round in range(3):
    score = score + 10
    print(name + " has " + str(score) + " points.")
if score >= 30:
    print("Finished!")
player = {"name": name, "score": score}
print("TODO - a final message from the dictionary")  # <-- CHANGE THIS LINE

Save the file as lesson17-practice.py and run it with F5 in IDLE. On a Mac, if F5 does nothing, use Run, then Run Module, from the menu.

Check yourself

Five quick questions on this lesson. Take the Lesson 17 quiz

Want graded quizzes and progress tracking?

Enroll free in the full course — same 17 lessons, with your progress saved. Free, no payment.