From now on you will write functions instead of whole programs. A function takes inputs (called parameters), does some work, and hands back an answer with return. The tests call your function with different inputs and check what comes back.
Write a function sign(n) that takes an integer n and returns one of three strings:
"positive"ifnis greater than 0"negative"ifnis less than 0"zero"ifnis exactly 0
Examples
Input: n = 5
Output: "positive"
Input: n = -3
Output: "negative"
Input: n = 0
Output: "zero"
Constraints
-10**9 <= n <= 10**9- Return the string; do not print it.
Goals
- Define a function with def and give a result back with return
- Choose between three outcomes with if, elif and else
- Compare numbers with > < and ==