Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

if number py

myVariable = input('Enter a number')
if type(myVariable) == int or type(myVariable) == float:
    # Do something
else:
    print('The variable is not a number')
Source by stackabuse.com #
 
PREVIOUS NEXT
Tagged: #number #py
ADD COMMENT
Topic
Name
2+8 =