Python Foundations·Practice drills 6

Drill 10: Rewrite it — Control flow

Rewrite the example in your own words or structure.

Beginner 5 min read Lesson 162 of 480 Challenge included
What you will be able to do
  • Rewrite the example in your own words or structure.

Practice task

Rewrite the example in your own words or structure.

control.pyPython
score = 78

if score >= 90:
    level = "excellent"
elif score >= 75:
    level = "passed"
else:
    level = "retry"

for day in range(1, 6):
    print(f"Study day {day}")

while score < 90:
    score += 2
Your turn

Write your answer

Easy

Rewrite the example in your own words or structure.

TEXT · starter
Your answer…
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 162 of 480 · 0% of course