Challenge: Identifying Positive Values
Uppgift
Swipe to start coding
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 to0
.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 6. Kapitel 6
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Suggested prompts:
Sammanfatta detta kapitel
Explain code
Explain why doesn't solve task
Awesome!
Completion rate improved to 1.64
Challenge: Identifying Positive Values
Svep för att visa menyn
Uppgift
Swipe to start coding
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 to0
.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Awesome!
Completion rate improved to 1.64Avsnitt 6. Kapitel 6
single