Week 3 Darts In darts there are 62 different possible scores : single 1 - 20, double 1 - 20 (i.e. 2, 4, 6, 8 ), treble 1 - 20 (i.e. 3, 6, 9, 12 ), 25 and 50. To ﬁnish, your ﬁnal dart must be a double or a ﬁfty. The highest possible score on which you can ﬁnish a game with three darts is therefore 170 (treble 20, treble 20, 50). Write a program that, given a target score, shows all the possible three-dart ﬁnishes. So for example if the target score is 151, one answer is treble 19, treble 20, double 17. Neill’s Optional Extra : Most darts players have “preferred” shots that they practice often e.g. treble 19, double 16 and so on. Modify the above code so that it only gives the “best” option for any particular score. Roman Numerals Adapted from http://mathworld.wolfram.com/RomanNumerals.html : “Roman numerals are a system of numerical notations used by the Romans. They are an additive (and subtractive) system in which letters are used to denote certain ”base” numbers, and arbitrary numbers are then denoted using combinations of symbols. Unfortunately, little is known about the origin of the Roman numeral system.
This is the end of the preview. Sign up
access the rest of the document.
This note was uploaded on 04/30/2008 for the course C CMPE 150 taught by Professor Tuna during the Spring '08 term at Boğaziçi University.