subject

LotteryChecker() is a function which will help determine the prize money of a lottery guess. It will take in the lottery number and the user guess as input, updates the variable prizeMoney accordingly and returns it. You can assume both lottery number and the user guess are two-digit numbers, from 10 to 99, both inclusive. Python solution?
The prize money is assigned based on the following rules:

If only one digit in the user’s guess matches any digit in the lottery number, the award is $1,000

If both the digits in the user’s guess match both the digits in the lottery number but in the wrong order, the award is $3,000.

If the user’s guess matches the lottery number in the exact order, the award is $10,000

The common mistakes include logic errors ( e. g, forgetting some cases). There is no problem with the grader, please think about whether your method covers all cases carefully.

ansver
Answers: 3

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 20:50, rrrrainy
What are the advantages of google cloud ?
Answers: 2
image
Computers and Technology, 22.06.2019 01:00, toottoot42169
What can you find the under the privacy policy section of a shopping website?
Answers: 1
image
Computers and Technology, 22.06.2019 13:50, juan3937
The instruction ishl (shift left integer) exists in jvm but not in ijvm. it uses the top two values on the stack, replacing the two with a single value, the result. the sec- ond-from-top word of the stack is the operand to be shifted. its content is shifted left by a value between 0 and 31, inclusive, depending on the value of the 5 least signifi- cant bits of the top word on the stack (the other 27 bits of the top word are ignored). zeros are shifted in from the right for as many bits as the shift count. the opcode for ishl is 120 (0x78).a. what is the arithmetic operation equivalent to shifting left with a count of 2? b. extend the microcode to include this instruction as a part of ijv.
Answers: 1
image
Computers and Technology, 23.06.2019 18:30, sawyerfauver
The computers in the sales department did not have enough data storage capacity to contain all the information the department needed to store, and it was taking a long time for team members to access the data they needed. to fix the problem, the technician installed new, larger hard drives on all the computers.
Answers: 1
You know the right answer?
LotteryChecker() is a function which will help determine the prize money of a lottery guess. It will...

Questions in other subjects:

Konu
Mathematics, 09.04.2021 07:50
Konu
Mathematics, 09.04.2021 07:50
Konu
Geography, 09.04.2021 07:50