Computer Science, asked by hassanriaz0815, 5 months ago

write a program that take number from user and prints greater than 1, less than 1, or equal to zero 10th class computer science​

Answers

Answered by jai696
2

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

def main(n):

if n == 0:

return "equal to zero"

return "greater than 1" if n > 1 else "less than 1"

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

print(main(n))

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

Answered by Japji21
0

Answer:

def main(n):

if n == 0:

return "equal to zero"

return "greater than 1" if n > 1 else "less than 1"

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

print(main(n))

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

Similar questions