Draft

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.

A Tombola

Games

Stats:

CreatedMar 13, 2019
Warriors Trained111
Total Skips23
Total Code Submissions104
Total Times Completed42
JavaScript Completions42
Total Stars1
% of votes with a positive feedback rating55% of 21
Total "Very Satisfied" Votes11
Total "Somewhat Satisfied" Votes1
Total "Not Satisfied" Votes9
Total Rank Assessments25
Average Assessed Rank
6 kyu
Highest Assessed Rank
1 kyu
Lowest Assessed Rank
8 kyu
Ad
Contributors
  • m0nkmaster Avatar
Ad