Positive Negative Zero

Beginner

Welcome to the number world! Here we have magical creatures named Positive, Negative, and Zero. They love to classify numbers that come their way. Let's help them out by writing a friendly Python function.

Your challenge is to create a function named positive_negative_zero that takes a single number as input and returns a string: 'Positive', 'Negative', or 'Zero'. Here's how you can visualize the game:

  • If the number is greater than zero, it's happy and shimmering in the sunlight, so you should classify it as 'Positive'.
  • If the number is less than zero, it's hiding in the shade, so label it as 'Negative'.
  • If the number is exactly zero, it's perfectly balancing between the two realms—just a plain old 'Zero'.

Here's how our magical function should work:

positive_negative_zero(5) # returns 'Positive' positive_negative_zero(-3) # returns 'Negative' positive_negative_zero(0) # returns 'Zero'

Are you ready to help our creatures by classifying numbers in the enchanted number forest? Let's start coding!

Geek
Inputs

Arg 1:

5
Expected Output
"Positive"
Actual Output
Positive Negative Zero [beginner] | Coding for Kids