subject

Since you love games of chance, you've decided to participate in a dice-rolling competition. The competition involves rolling three 6-sided dice, and the results of each die are represented by the integers a, b, and c respectively. Scores are calculated according to the following rules: If all three dice had the same value (a = b = c) then you earn 1000 * a.
If exactly two of them are the same, you earn 500 * x (where x is the value of the two equal dice).
If all of them are different, you earn 100 * min(a, b, c).
Given the values of a, b, and c, your task is to calculate and return your total score.
Example
For a = 3, b = 3, and c = 3, the output should be diceTotalScore(a, b, c) = 3000.
Since all of the dice have the same value, your total score is equal to 1000 * 3 = 3000.
For a = 3, b = 6, and c = 3, the output should be diceTotalScore(a, b, c) = 1500.
Since exactly two of the values are the same (a = c = 3), your total score is equal to 500 * 3 = 1500.
For a = 3, b = 2, and c = 5, the output should be diceTotalScore(a, b, c) = 200.
Since all of these values are different, your total score is equal to 100 * min(a, b, c) = 100 * 2 = 200.
Input/Output
[execution time limit] 4 seconds (py3)
[input] integer a
An integer representing the value of the first die.
Guaranteed constraints:
1 ≤ a ≤ 6.
[input] integer b
An integer representing the value of the second die.
Guaranteed constraints:
1 ≤ b ≤ 6.
[input] integer c
An integer representing the value of the third die.
Guaranteed constraints:
1 ≤ c ≤ 6.
[output] integer
Return your total score
Pleasee use Python
def diceTotalScore(a, b, c):

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 02:00
Which demographic challenge is europe currently experiencing? a. an aging and decreasing population b. a baby boomc. an unequal distribution between males and females d. a large group of teenagers moving through the school system(i chose a but i'm unsure)
Answers: 1
question
Computers and Technology, 23.06.2019 07:00
Why were most movies from the late 1890s until the early 1930s only filmed in black and white? there were only a few people who could afford the technology to produce color motion pictures back then. audiences did not want color motion pictures until later. the film used to make color motion pictures often overheated, which was a safety hazard, so it was generally not allowed. color films had to be hand-colored, frame by frame.
Answers: 3
question
Computers and Technology, 23.06.2019 20:30
Column a of irma’s spreadsheet contains titles for each row, but her document is too big and will be printed three pages across. she wants to be sure that every page will be understood. what can irma do to with this problem?
Answers: 3
question
Computers and Technology, 24.06.2019 14:00
Which computer tools allow you to communicate with coworkers, family,and friends
Answers: 1
You know the right answer?
Since you love games of chance, you've decided to participate in a dice-rolling competition. The com...
Questions