Computer Science, asked by udaynishtha, 9 months ago

open this file and answer it

Attachments:

Answers

Answered by adarshpataneking
0

Explanation:

# if there is a G between $ and T or not

inp = input()

st="G"

sta=0

for n in inp:

if n=="T":

if st=="$":

print("ALARM")

sta=1

break

else:

st="T"

elif n=="$":

if st=="T":

print("ALARM")

sta=1

break

else :

st="$"

elif n=="G":

st="G"

sta=0

if sta==0:

print("quiet")

Similar questions