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".
Lösung
Danke für Ihr Feedback!
single
Fragen Sie AI
Fragen Sie AI
Fragen Sie alles oder probieren Sie eine der vorgeschlagenen Fragen, um unser Gespräch zu beginnen
Can you explain this in simpler terms?
What are the main points I should remember?
Can you give me an example?
Großartig!
Completion Rate verbessert auf 5.56
Challenge: Classify Numbers
Swipe um das Menü anzuzeigen
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".
Lösung
Danke für Ihr Feedback!
single