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

Svep för att visa menyn

book
Challenge: 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.

Uppgift

Swipe to start coding

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!

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 6

Fråga AI

expand
ChatGPT

Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal

book
Challenge: 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.

Uppgift

Swipe to start coding

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!

Lösning

Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Var allt tydligt?

Hur kan vi förbättra det?

Tack för dina kommentarer!

Avsnitt 1. Kapitel 6
Switch to desktopByt till skrivbordet för praktisk övningFortsätt där du är med ett av alternativen nedan
Vi beklagar att något gick fel. Vad hände?
some-alt