0

Please help me understand this program?

s=input() a=0 for i in range(len(s)-1): if s[i] =='

#x27;or s[i]=='T': for j in range(i+1,len(s)): if s[j]=='G': a=1 break elif s[j]=='T' or s[j]=='
#x27;: a=2 break if a==1: print ("quiet") break elif a==2: print("ALARM") break

3rd Nov 2020, 6:36 PM
Ria Zakia
Ria Zakia - avatar
2 Answers
+ 3
Your code will check if there are a gard between money and thief or between T and $ if there are G output will be quiet https://code.sololearn.com/cYF6587E4AIY/?ref=app
3rd Nov 2020, 7:40 PM
HBhZ_C
HBhZ_C - avatar
0
Thanks
4th Nov 2020, 4:53 AM
Ria Zakia
Ria Zakia - avatar