Write a program to check whether a given number is positive or negative using a ternary operator
Answers
Answered by
2
n = int(input("enter a num: "))
print("positive") if n > 0 else print("negative")
Answered by
0
Answer:
n = int(input("enter a num: "))
print("positive") if n > 0 else print("negative")
Similar questions