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

Pyyhkäise näyttääksesi valikon

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.

Tehtävä

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!

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?

Kysy tekoälyä

expand
ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

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.

Tehtävä

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!

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 1. Luku 6
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt