simeonshopov

Sign of integer number (functions/book)

Nov 13th, 2019
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. def print_sign(num):
  2.   if num is 0:
  3.     print(f"The number {num} is zero.")
  4.   elif num < 0:
  5.     print(f"The number {num} is negative.")
  6.   elif num > 0:
  7.     print(f"The number {num} is positive.")
  8.    
  9. print_sign(int(input()))
Advertisement
Add Comment
Please, Sign In to add comment