项目作者: en9inerd

项目描述 :
Greenphire assessment
高级语言: Python
项目地址: git://github.com/en9inerd/greenphire-assessment.git
创建时间: 2017-04-12T02:19:19Z
项目社区:https://github.com/en9inerd/greenphire-assessment

开源协议:

下载


Greenphire Assessment

Powerball story:

As a Greenphire employee I would like to add my favorite 6 numbers to consider for a Powerball entry ticket so that I can win 1 billion dollars.

  • Capture the name of the employees entering the number.
    The first 5 favorite numbers will need to be in the range of 1 to 69 and unique. (remember that this is a drawing so there cannot be duplicates in this range of 5 numbers)
  • 6th favorite number will need to be in the range of 1 to 26 and flagged as the 6th Powerball number.
  • Keep count of each individual favorite number provided to determine which numbers to use in our final winning number. (i.e. count the duplicates).
  • Retrieve the max count of each unique duplicate number and use them as the Powerball numbers.
  • if there is a tie based on the max counts randomly select the tied number.
  • Display all employees with their corresponding number entries.
  • Display the final Powerball number based on the requirements above.

Sample output:

  1. Enter your first name: Wade
  2. Enter your last name: Wilson
  3. select 1st # (1 thru 69): 12
  4. select 2nd # (1 thru 69 excluding 12): 20
  5. select 3rd # (1 thru 69 excluding 12 and 20): 23
  6. select 4th # (1 thru 69 excluding 12, 20, and 23): 56
  7. select 5th # (1 thru 69 excluding 12, 20, 23, and 56): 30
  8. select Power Ball # (1 thru 26): 25
  9. Wade Wilson 15 26 33 60 34 Powerball: 16
  10. Frank Castle 15 26 34 56 61 Powerball: 16
  11. Powerball winning number:
  12. 15 26 34 55 63 Powerball: 16