+ 2
Python course 24.2(continue course or lesson)
I struggled to solve the time to practice in that lesson can someone help?
9 ответов
+ 2
U mean a language if yeah so i finished html
+ 2
No, I was asking about your solution like Sololearn provided in see a solution section.
+ 2
You're missing a closing bracket for int() in line 4
0
So do u know the answer to it
0
Like what
0
Ye just give me one sec
0
total = 0 #variable for the total cost of tickets
passengers = 5 #number of expected passengers
while passengers > 0: #if and only if the amount of passengers remaining is greater than 0
age = int(input() #ask for age
if age > 3: #if the passenger age is more than 3
total += 100 #update the total cost by 100
passengers -= 1 #after updating cost, update the remaining passengers value by -1
print(total) #once the remaining passengers reaches 0 (the loop condition) print the total cost.
0
Its with notes to make it easier
0
Ok thanks alot