I was trying out to write a small prog to prompt the user input for numbers...
I used the isdigit func to check whether the input is a number or string... it works but this doesn't accept float as a number... how can i do to make it works for both integer and float?
n1 = input("Enter the first number: ")
if n1.isdigit() == False:
n1 = int(n1)