Detect Floating Point Number

  • + 0 comments
    n = input()
    
    for i in range(int(n)):
        a = input()
        if a == '0' :
            print("False")
        else:
            try:
              float(a)
              print("True")
            except ValueError:
              print("False")