Skip to content

Commit 8e764a7

Browse files
authored
Merge pull request #31 from HighnessAtharva/patch-11
Create DetectFloatingPointNumbers.py
2 parents 5584a3d + 2f6b017 commit 8e764a7

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('^[-+]?\d*\.\d+$')
13+
for _ in range(int(input())):
14+
print(bool(pattern.match(input())))

0 commit comments

Comments
 (0)