0

Why does 4 test case fail ?

https://code.sololearn.com/c68x7Xe1k1Y9/?ref=app See practice exercises 😉

11th Nov 2020, 5:37 PM
Sanjay Kamath
Sanjay Kamath - avatar
4 Respostas
+ 3
a=int(input()) b=int(input()) c=int(input()) persons_ages = [] i=0 pers_age = a persons_ages.append(a) #pers_age = 18 pers_age = b persons_ages.append(b) pers_age = c persons_ages.append(c) #your code goes here while i<3: if (persons_ages[i] <17): print('Too young!') break else: print('Get ready!') break i+=1 PLEASE REPORT THE ERROR 🤒
12th Nov 2020, 4:43 AM
Sanjay Kamath
Sanjay Kamath - avatar
+ 1
You can append to list person_age var a,b,c
11th Nov 2020, 6:19 PM
Václav Dostál
Václav Dostál - avatar
0
Then beware of indentation on last line i+=1
11th Nov 2020, 6:21 PM
Václav Dostál
Václav Dostál - avatar
0
persons_ages = [] o=[] i = 0 while i<3: pers_age = int(input()) persons_ages.append(pers_age) i+=1 for person in persons_ages: if person<=16: o.append('Too young!') else: o.append('Get ready!') if 'Too young!' in o: print('Too young!') else: print('Get ready!')
12th Nov 2020, 7:04 PM
Václav Dostál
Václav Dostál - avatar