+ 2

Python course 24.2(continue course or lesson)

I struggled to solve the time to practice in that lesson can someone help?

29th Mar 2022, 11:45 AM
Moamen Ahmed
9 Answers
+ 2
U mean a language if yeah so i finished html
29th Mar 2022, 11:49 AM
Moamen Ahmed
+ 2
No, I was asking about your solution like Sololearn provided in see a solution section.
29th Mar 2022, 11:50 AM
Simba
Simba - avatar
+ 2
You're missing a closing bracket for int() in line 4
29th Mar 2022, 12:04 PM
Simba
Simba - avatar
0
So do u know the answer to it
29th Mar 2022, 11:46 AM
Moamen Ahmed
0
Like what
29th Mar 2022, 11:48 AM
Moamen Ahmed
0
Ye just give me one sec
29th Mar 2022, 11:56 AM
Moamen Ahmed
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.
29th Mar 2022, 11:57 AM
Moamen Ahmed
0
Its with notes to make it easier
29th Mar 2022, 11:58 AM
Moamen Ahmed
0
Ok thanks alot
29th Mar 2022, 12:05 PM
Moamen Ahmed