1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Anna35 [415]
4 years ago
13

Your school is hosting a diving contest, and they need a programmer to work on the scoreboard! Your job is to calculate each div

er's total after the three judges hold up their individual scores. Write the function calculate_score which takes a tuple of three numbers from 0 to 10 and calculates the sum. A perfect dive is worth 30 points, a belly flop is worth 0. For example: calculate_score((10, 10, 10)) # => 30 calculate_score((9, 9, 6)) # => 24
Computers and Technology
1 answer:
prohojiy [21]4 years ago
3 0

Answer:

def calculate_score(setss):

    num1, num2, num3= setss

    if num1 >= 0 and num1 <=10 and num2>= 0 and num2<=10 and num3>= 0 and num3<=10:

         print(num1+ num2+num3)

    else:

         print("Out of range")

Explanation:

<em>I've added the full source code as an attachment, where I used comments as explanation</em>

Download txt
You might be interested in
The superclass Calculator contains: a protected double instance variable, accumulator, that contains the current value of the ca
yawa3891 [41]

Answer:

The following program are written in JAVA Programming Language.

//inherit the Calculator class

public class CalculatorWithMemory extends Calculator {  

   private double memory = 0.0;    //initialize double type variable

   public void save() {   //define function

       memory = accumulator;    

   }

   public void recall() {   //define function

       accumulator = memory;

   }

   public void clearMemory() {   //define function

       memory = 0;     //initialize the value

   }

   public double getMemory() {  

       return memory;    // return the value in "memory" variable

   }

}

Explanation:

Here, we inherit the property of the "Calculator" class.

Then, we define the private double type variable "memory" and assign value 0.0.

Then we set the function "save()" inside it we assign the value of "memory" in "accumulator" and close the function.

Then, we define the function "recall()" inside it we assign the value of "accumulator" in "memory" and close the function.

Then we set the function "clearMemory()" inside it we assign "memory" to 0.

After all, we set the double type function "getMemory()" inside we return the value of the "memory".

7 0
4 years ago
Part of preforming routine computer maintenance includes
omeli [17]
Cleaning And tidy cords
7 0
3 years ago
Read 2 more answers
The roll out, roll in variant of swapping is used ____."
Sindrei [870]

Answer:

C.) for priority-based scheduling algorithms

Explanation:

for priority-based scheduling algorithms

4 0
3 years ago
HELP WILL MARK BRAINLIEST!!!!!!!!!!!!!!!!!<br> How do you take a screenshot on Windows 7?
Alina [70]
U can see the printscr botton at the top right of ur keyboard and then u can type paint and the control v. 
3 0
3 years ago
Read 2 more answers
What are the possible consequences of plagiarism?
Semenov [28]

Answer:

Students who plagiarize or otherwise engage in academic dishonesty face serious consequences. Sanctions may include, but are not limited to, failure on an assignment, grade reduction or course failure, suspension, and possibly dismissal.

3 0
3 years ago
Other questions:
  • Question: A famous Disney Movie partially takes place in this city.
    15·2 answers
  • Jenny wants to create a résumé after a two-years gap. What should she consider?
    11·2 answers
  • You have a user who takes his laptop home every day after work. When he's working in the office, the laptop must get an IP addre
    13·1 answer
  • Put the steps of the decision-making process in the correct order.
    12·1 answer
  • Convert to binary140
    5·1 answer
  • Describe the dynamic Network Address Translation (NAT).
    9·1 answer
  • Which of these is the function of a modeler?
    5·2 answers
  • Why do software managers have to be generalists with a range of skills, rather than simply technical specialists?
    14·1 answer
  • Of what is famous Ted Nelson?​
    8·1 answer
  • It takes Mike 18 minutes to finish reading 4 pages of a book. How long would it take for him to finish 30 pages ?​
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!