Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check if number is negative in python

num = -10

if num < 0:
  print(f"number you entered:{num} is negative")
 
PREVIOUS NEXT
Tagged: #check #number #negative #python
ADD COMMENT
Topic
Name
8+4 =