Challenge: Classify Numbers
Swipe to start coding
Write a function that takes a single numeric input and returns a string indicating whether the number is "Positive", "Negative", or "Zero". Use if, else if, and else statements to determine the correct label.
- If the input is greater than zero, return "Positive".
- If the input is less than zero, return "Negative".
- If the input is equal to zero, return "Zero".
Oplossing
Bedankt voor je feedback!
single
Vraag AI
Vraag AI
Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Geweldig!
Completion tarief verbeterd naar 5.56
Challenge: Classify Numbers
Veeg om het menu te tonen
Swipe to start coding
Write a function that takes a single numeric input and returns a string indicating whether the number is "Positive", "Negative", or "Zero". Use if, else if, and else statements to determine the correct label.
- If the input is greater than zero, return "Positive".
- If the input is less than zero, return "Negative".
- If the input is equal to zero, return "Zero".
Oplossing
Bedankt voor je feedback!
single