Skip to content

Commit 11deecf

Browse files
Create virus_outbreak.py
1 parent 685f891 commit 11deecf

File tree

1 file changed

+29
-0
lines changed

1 file changed

+29
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
2+
def isSubsequence(V,B):
3+
list_v = []
4+
list_b = []
5+
for c in V:
6+
list_v.append(c)
7+
8+
for j in B:
9+
list_b.append(j)
10+
11+
vindex = 0
12+
bindex = 0
13+
while vindex < len(list_v) and bindex < len(list_b):
14+
if list_v[vindex] == list_b[bindex]:
15+
bindex += 1
16+
vindex += 1
17+
18+
if bindex == len(list_b):
19+
return True
20+
return False
21+
22+
V = str(input())
23+
N = int(input())
24+
for i in range(N):
25+
B = str(input())
26+
result = isSubsequence(V,B)
27+
if result == True:
28+
print("POSITIVE")
29+
else:

0 commit comments

Comments
 (0)