Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. s = input()
  2. c = s.count(',')
  3. if c > 1:
  4. print('Not is float')
  5. else:
  6. test = True
  7. for i in range(len(s)):
  8. if (i > 0):
  9. if ((s[i] > '9')or(s[i] < '0'))and(s[i] != ','):
  10. test = False
  11. if test:
  12. print('Is float')
  13. else:
  14. print('Is not float')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement