Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Challenge: Mario | Python if Statement
Conditional Statements in Python
course content

Course Content

Conditional Statements in Python

Conditional Statements in Python

1. Python if Statement
2. Python if-else Statement
3. Python if-elif-else Statement
4. Python Ternary Operator

bookChallenge: Mario

Let's play! We're playing Mario, and he encounters a block obstacle. Mario can overcome this obstacle by transforming into Super Mario, which grants him increased size and power. To achieve this, he needs to obtain the Super Mushroom.

Task
test

Swipe to show code editor

You should write two scenarios: one where Mario has a Super Mushroom and another where he does not.

  1. Write the keyword if to complete the first condition;
  2. Show the outcome if the first condition holds true using the print function;
  3. Complete the second statement with variable has_super_mushroom.

Great job! Keep up your journey, Super Mario!

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 3
toggle bottom row

bookChallenge: Mario

Let's play! We're playing Mario, and he encounters a block obstacle. Mario can overcome this obstacle by transforming into Super Mario, which grants him increased size and power. To achieve this, he needs to obtain the Super Mushroom.

Task
test

Swipe to show code editor

You should write two scenarios: one where Mario has a Super Mushroom and another where he does not.

  1. Write the keyword if to complete the first condition;
  2. Show the outcome if the first condition holds true using the print function;
  3. Complete the second statement with variable has_super_mushroom.

Great job! Keep up your journey, Super Mario!

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Section 1. Chapter 3
toggle bottom row

bookChallenge: Mario

Let's play! We're playing Mario, and he encounters a block obstacle. Mario can overcome this obstacle by transforming into Super Mario, which grants him increased size and power. To achieve this, he needs to obtain the Super Mushroom.

Task
test

Swipe to show code editor

You should write two scenarios: one where Mario has a Super Mushroom and another where he does not.

  1. Write the keyword if to complete the first condition;
  2. Show the outcome if the first condition holds true using the print function;
  3. Complete the second statement with variable has_super_mushroom.

Great job! Keep up your journey, Super Mario!

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

Let's play! We're playing Mario, and he encounters a block obstacle. Mario can overcome this obstacle by transforming into Super Mario, which grants him increased size and power. To achieve this, he needs to obtain the Super Mushroom.

Task
test

Swipe to show code editor

You should write two scenarios: one where Mario has a Super Mushroom and another where he does not.

  1. Write the keyword if to complete the first condition;
  2. Show the outcome if the first condition holds true using the print function;
  3. Complete the second statement with variable has_super_mushroom.

Great job! Keep up your journey, Super Mario!

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Section 1. Chapter 3
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt