 Challenge: Identifying Positive Values
Challenge: Identifying Positive Values
Task
Swipe to start coding
Create a function called is_positive that takes in a single argument, n. It should return:
- 'positive'if- nis greater than- 0.
- 'negative'if- nis less than- 0.
- 'zero'if- nis equal to- 0.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 6
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Suggested prompts:
Summarize this chapter
Explain the code in file
Explain why file doesn't solve the task
Awesome!
Completion rate improved to 1.67 Challenge: Identifying Positive Values
Challenge: Identifying Positive Values
Swipe to show menu
Task
Swipe to start coding
Create a function called is_positive that takes in a single argument, n. It should return:
- 'positive'if- nis greater than- 0.
- 'negative'if- nis less than- 0.
- 'zero'if- nis equal to- 0.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 6. ChapterΒ 6
single