Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Oppiskele Challenge: Identifying Positive Values | Functions in Python
Introduction to Python(ihor)

bookChallenge: Identifying Positive Values

Tehtävä

Swipe to start coding

Create a function called is_positive that takes in a single argument, n. It should return:

  • 'positive' if n is greater than 0.
  • 'negative' if n is less than 0.
  • 'zero' if n is equal to 0.

Ratkaisu

Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 6. Luku 6
single

single

Kysy tekoälyä

expand

Kysy tekoälyä

ChatGPT

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

Suggested prompts:

Tiivistä tämä luku

Explain code

Explain why doesn't solve task

close

Awesome!

Completion rate improved to 1.67

bookChallenge: Identifying Positive Values

Pyyhkäise näyttääksesi valikon

Tehtävä

Swipe to start coding

Create a function called is_positive that takes in a single argument, n. It should return:

  • 'positive' if n is greater than 0.
  • 'negative' if n is less than 0.
  • 'zero' if n is equal to 0.

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!

close

Awesome!

Completion rate improved to 1.67
Osio 6. Luku 6
single

single

some-alt