Computer Science, asked by royantonyfff, 5 months ago

Write a program to check whether a given number is positive or negative using a ternary operator​

Answers

Answered by valeriy69
2

\large\mathsf\color{pink}{Solution\: using\: python\: 3}

n = int(input("enter a num: "))

print("positive") if n > 0 else print("negative")

\large\mathsf\color{lightgreen}useful?\: \color{white}\longrightarrow\: \color{orange}brainliest!

Answered by Japji21
0

Answer:

n = int(input("enter a num: "))

print("positive") if n > 0 else print("negative")

Similar questions
Math, 2 months ago