Step 1 of 30
Time Remaining30:00

Topic: Boolean Syntax

1 / 30

You are reviewing a pull request from a junior developer who is trying to set a flag for a user's subscription status. They have written the following code:

# Setting the subscription flag is_subscribed = true

When they try to run this script, Python throws a NameError: name 'true' is not defined. Based on Python's strict syntax rules, which of the following is the correct way to fix this?

Your Answer

Select the best option below.

is_subscribed = "True"
is_subscribed = True
is_subscribed = (true
is_subscribed = 1.0

Review your choice before proceeding.