Create a program that takes an integer as input. The program should print 'Positive' if the number is greater than 0, 'Negative' if the number is less than 0 and 'Zero' if the number is 0.
Determining if an integer is positive, negative, or zero
Report a typo
Sample Input 1:
3Sample Output 1:
PositiveSample Input 2:
-1Sample Output 2:
NegativeWrite a program in Python 3
# Function to test if a number is Positive, Negative, or Zero
def check_num(n):
# Define your if-statement here to check the value of n
# and return "Positive", "Negative", or "Zero"
# Testing your function with inputs
# Remember to call the check_num function with a number as argument.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.