Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to check if number has decimals python

a = 2.3

if a//1 == a/1:
  # it does not have decimal values
else:
  # otherwise it does
 
PREVIOUS NEXT
Tagged: #check #number #decimals #python
ADD COMMENT
Topic
Name
3+6 =