Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

how to check if number is negative in python

num = -10

if num < 0:
  print(f"number you entered:{num} is negative")
Comment

PREVIOUS NEXT
Code Example
Python :: make int into string python 
Python :: Python - How To Check if a String Contains Word 
Python :: reversed function python 
Python :: list get every 2nd element 
Python :: How to calculate distance without numpy 
Python :: python pandas how to get all of the columns names 
Python :: python change directory to previous 
Python :: reset index in pandas 
Python :: how to update values in tkinter 
Python :: numpy dot product 
Python :: open gui window python 
Python :: encryption using python 
Python :: os.getcwd() python 3 
Python :: how to reference variable in another file python 
Python :: reshape python 
Python :: python open directory and read files 
Python :: get array dimension numpy 
Python :: keep tkinter window below others 
Python :: maximum element in dataframe row 
Python :: how to get the last value in a list python 
Python :: plotly pie chart in pie chart 
Python :: getsizeof python 
Python :: lambda function dataframe 
Python :: tkinter frameless window 
Python :: Python Frozenset() for Dictionary 
Python :: python remove duplicates from list of dict 
Python :: flask docs 
Python :: sort by the frequency of occurrences in Python 
Python :: gpt-3 tokenizer python3 
Python :: calculate pointbiseral correlation scipy 
ADD CONTENT
Topic
Content
Source link
Name
5+1 =