Lotto is a form of lottery in which a given number of balls are drawn from a larger pool. Players can tick their own numbers on a lotto form. The higher the amount of matching numbers between the form and the balls drawn, the bigger the prize.

lotto

Several European countries have their own lottery systems, that mainly differ in the total number of balls played with, the number of balls that are drawn and the number of ticks allowed on the lotto form. In Belgium and in the Netherlands, players can tick (from October 2011 onwards) six numbers on a form from the series of numbers between 1 and 45. In the eighties and nineties the Dutch lotto was played with 40 balls and until September 2011 the Belgian lottery was played with 42 balls. Players in the United Kingdom and Germany can choose from the numbers 1 to 49. Seven balls are drawn in the Belgian lottery. This was also the case in the Netherlands until 2 March 2008. After this date the rules of the lottery were changed and only six balls were drawn.

Assignment

Write a function lottery that can be used to simulate a lotto draw. The function should have two optional parameters count and maximum. The number of balls $$c$$ to be drawn can be passed to the parameter count (default value 6). The total number of balls $$m$$ can be passed to the parameter maximum (default value 42). As such, the balls are numbered 1 to $$m$$. You may assume that $$c \leq m$$. The function should return a string that contains a strictly increasing list of $$c$$ integers, where the integers are separated from each other with a space, a dash (-) and another space. For each integer $$n$$ it must hold that $$1 \leq n \leq m$$. Make sure that each of the $$m$$ balls have equal probability of being drawn by the function.

Example

>>> lottery()
'2 - 17 - 22 - 27 - 35 - 40'
>>> lottery(count=8)
'5 - 13 - 15 - 31 - 34 - 36 - 39 - 40'
>>> lottery(maximum=21)
'1 - 5 - 6 - 8 - 17 - 20'
>>> lottery(count=4, maximum=38)
'16 - 20 - 35 - 37'
>>> lottery(maximum=256, count=12)
'6 - 12 - 39 - 47 - 87 - 132 - 179 - 208 - 213 - 231 - 240 - 249'