Only the first true branch
Predict the output · Basic · §6.3 Many branches
This code classifies a post by its likes and comments. Predict the output without running the code.
Code
likes = 150
comments = 30
if comments >= 50:
print("Discussion post")
elif likes >= 100:
print("Popular post")
elif comments >= 20:
print("Post with many comments")
else:
print("Regular post")
print("Classification done")Solve this problem in your browser
Python runs in your browser and checks your answer right away. Hints and the answer are on the problem page.