Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check if input is numeric

import sys
def checkNum(number):
    try:
        number = float(number)
    except ValueError:
        print("That is not a float.")
        sys.exit()
    return number
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #input #numeric
ADD COMMENT
Topic
Name
2+6 =