0
Why does 4 test case fail ?
https://code.sololearn.com/c68x7Xe1k1Y9/?ref=app See practice exercises 😉
4 Antworten
+ 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 🤒
+ 1
You can append to list person_age var a,b,c
0
Then beware of indentation on last line i+=1
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!')