Tombola teaser
Description:
A Tombola is a British game in which people pick tickets out of a revolving drum and certain tickets win a prize. Tombolas are often found at fetes and fairs. Tickets are commonly taken from a Raffle book and include the numbers 1 to 999.
Winning tickets must contain a certain number, or have a certain characteristic; some examples are:
1 "Any ticket containing a 7 wins" 2 "Any ticket ending with a 5 or a 0 wins"
Taking the simpler first option of any ticket containing a certain number, could you please write a function which returns the number of winning tickets in a raffle book. The number can be one or two digits.
Your function should take two values; the total number of tickets (you can assume the ticket book starts at 1) and the number which must be present for a ticket to win.
Similar Kata:
Stats:
Created | Mar 13, 2019 |
Warriors Trained | 111 |
Total Skips | 23 |
Total Code Submissions | 104 |
Total Times Completed | 42 |
JavaScript Completions | 42 |
Total Stars | 1 |
% of votes with a positive feedback rating | 55% of 21 |
Total "Very Satisfied" Votes | 11 |
Total "Somewhat Satisfied" Votes | 1 |
Total "Not Satisfied" Votes | 9 |
Total Rank Assessments | 25 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 1 kyu |
Lowest Assessed Rank | 8 kyu |