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
Join this Course
Sign in to save your progress.
-
Before You Write Code
-
Introduction to Python Programming: What It Is and Why Start Here
-
Installing Python and Running Your First Script
-
-
-
The Basics You Cannot Skip
-
Python Variables and Data Types
-
Python Operators and Expressions
-
Getting Input and Printing Output in Python
-
-
-
Making Decisions and Repeating Work
-
Python If Statements: Making Your Code Decide
-
Python Loops: For, While, and When to Stop
-
-
-
Organizing Your Code
-
Python Functions: Stop Copying and Pasting
-
Python Lists and Dictionaries
-
-
-
When Things Go Wrong
-
Reading Python Error Messages Instead of Panicking
-
Python Try and Except: Handling Errors Properly
-
-
- Final Check: Python for Beginners
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?
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 commentNo comments yet.