Skip to content

Commit e13dbd5

Browse files
Create DetectFloatingPointNumbers.py
Missing problem added with working solution.
1 parent 2a3b561 commit e13dbd5

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
'''
2+
Title : Detect Floating Point Numbers
3+
Subdomain : Regex and Parsing
4+
Domain : Python
5+
Author : Atharva Shah
6+
Created : 3 April 2021
7+
Problem : https://www.hackerrank.com/challenges/introduction-to-regex/problem
8+
'''
9+
10+
from re import match, compile
11+
12+
pattern = compile('^[-+]?[0-9]*\.[0-9]+$')
13+
for _ in range(int(input())):
14+
print(bool(pattern.match(input())))

0 commit comments

Comments
 (0)