Code Coach Security Help | Sololearn: Learn to code for FREE!

+1

Code Coach Security Help

Can somebody help me with the security challenge, I tried it in c++ so i would like c++ code but I would be happy with anything, thanks.

1/13/2020 10:56:47 PM

David Binenfeld

4 Answers

New Answer

+5

Please show us your attempt.

+4

Check out 👇 s=input() a=0 for i in range(len(s)-1): if s[i] =='$'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]=='$': a=2 break if a==1: print ("quiet") break elif a==2: print("ALARM") break

0

show us ur attempt

0

Ruby solution word = gets.chomp.to_s word_new = word.gsub("x","") if((word_new.include? "T$") ||( word_new.include? "$T")) puts 'ALARM' else puts 'quiet' end