You need to sign in or sign up before continuing.×
Retired
Ukranian bus level 1 (retired)
11sapka2
Description:
In Ukraine when you enter a bus you need to pay for the fare and there are no tickets. And there are situations when somebody pays for several people. But because of other people who intend to enter the bus there are often occasions when people, which was paid for enters after some others. So the driver must remember how many people paid and how many entered. So the task is to help a driver find out if in his bus a person who did not paid for fare. The function will take an array, each element of which will represent the passenger and value will show how many passengers he has paid for.
Examples
people=[1,2,0,1,0] #because there are more passangers than tickets
output='Driver, you have been fooled!'
people=[1,2,0,3,0,0] #because tickets are equal to amount of passengers
output='Driver, you may go!'
people=[1,2,0,2] #because there are more tickets than passangers
output='Driver, wait a minute!'
Fundamentals
Similar Kata:
Stats:
Created | Oct 31, 2024 |
Warriors Trained | 10 |
Total Skips | 0 |
Total Code Submissions | 40 |
Total Times Completed | 11 |
Python Completions | 11 |
Total Stars | 0 |
% of votes with a positive feedback rating | 33% of 6 |
Total "Very Satisfied" Votes | 1 |
Total "Somewhat Satisfied" Votes | 2 |
Total "Not Satisfied" Votes | 3 |
Total Rank Assessments | 6 |
Average Assessed Rank | 8 kyu |
Highest Assessed Rank | 7 kyu |
Lowest Assessed Rank | 8 kyu |