Skip to Content
Python for Beginners: Write Code That Actually Runs, Then Make It Better
Beginner
0 likes
Courses
Python for Beginners: Write Code That Actually Runs, Then Make It Better

Check Yourself: Making Decisions and Repeating Work

Five questions on if statements and loops. If the loop questions trip you up, reread the while loop part. That's usually where it goes wrong.

Course content

Sign in to save your progress.

Course Home
1. A score of 95 gets grade "C". The code checks if score >= 70 first, then elif score >= 90. What is wrong?
2. Your program hangs forever. It has while balance < 2000: and inside it only prints the balance. Why?
3. You need to process every name in a list of 40 customers. Which loop fits best?
4. How many numbers does range(1, 10) produce?
5. A user may type 0 as a valid quantity. You wrote if quantity: to check that something was entered. What goes wrong?

About

Five questions on if statements and loops. If the loop questions trip you up, reread the while loop part. That's usually where it goes wrong.

Duration
5 min
Last update
09/16/2026
Was this helpful?
​ 0 ​ 0

Comments (0)

Sign in to comment

No comments yet.