Goal: Learn to make decisions in code using conditions.
Instructions:
Create variables score and passing_score. Assign score = 75 and passing_score = 50.
Write an if-else statement that prints:
"You passed!" if score >= passing_score.
"You need to retake the test." otherwise.
Python Code:
# Step 1: Create variables
score = 75
passing_score = 50
# Step 2: If-else statement
if score >= passing_score:
print("You passed!")
else:
print("You need to retake the test.")