Contenido del Curso
Introduction to Python
3. Conditional Statements
Boolean Data TypeChallenge: Comparison OperatorsCombining ConditionsChallenge: Logical OperatorsMembership Operators and Types ComparisonSimple if/else ExpressionsChallenge: Grocery StoreChallenge: Odd and Evenif/elif/else ExpressionsChallenge: Grocery Store ExtendedChallenge: Positive, Negative or Zero
Introduction to Python
Challenge
Tarea
Your task is to create a function called is_positive
that takes in a single argument, n
. It should return:
'positive'
ifn
is greater than0
.'negative'
ifn
is less than0
.'zero'
ifn
is equal to zero.
¿Todo estuvo claro?
Sección 6. Capítulo 6
Contenido del Curso
Introduction to Python
3. Conditional Statements
Boolean Data TypeChallenge: Comparison OperatorsCombining ConditionsChallenge: Logical OperatorsMembership Operators and Types ComparisonSimple if/else ExpressionsChallenge: Grocery StoreChallenge: Odd and Evenif/elif/else ExpressionsChallenge: Grocery Store ExtendedChallenge: Positive, Negative or Zero
Introduction to Python
Challenge
Tarea
Your task is to create a function called is_positive
that takes in a single argument, n
. It should return:
'positive'
ifn
is greater than0
.'negative'
ifn
is less than0
.'zero'
ifn
is equal to zero.
¿Todo estuvo claro?
Sección 6. Capítulo 6