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
What parts of the computer does it not need to function?​
Thepotemich [5.8K]
Fancy lights, mouse, keyboard, you can do fan but the computer will eventually overheat, it need coolant for it to run for a long while
6 0
3 years ago
Which toolbar is located next to the office button and contain the commonly used commands​
Andrei [34K]

Answer: Quick Access Toolbar

The Quick Access Toolbar is located to the right of the Microsoft Office Button . It contains commands that are used most often, for example Redo, Undo and Save.

Explanation:

7 0
3 years ago
"You are working on a Debian distribution of Linux. You need to install a package, but you do not want to manually install all t
Stella [2.4K]

Answer:

apt-get

Explanation:

apt-get can be used to manually install a package, without need to manually install all the dependencies for the package.

7 0
3 years ago
A database program helps to ____________.
Juliette [100K]
D. A database is software which is designed to store massive amounts of data and organize them in such a way that information can easily be worked on (added, deleted, moved, etc...).
8 0
3 years ago
Read 2 more answers
If the ____________ is broken on a laptop, chances are other parts are also broken.
ella [17]
Central processing Unit
8 0
3 years ago
Other questions:
  • Please help me with these questions
    5·1 answer
  • If you need assistance with your I-20 which phone number at UC would you call?
    10·1 answer
  • Data flow is not a major consideration when building an analytics model. T/F
    13·1 answer
  • A(n) is the tool that will help you the most when developing the content you will use in your presentation.
    10·1 answer
  • What is an Apple Pen?
    5·2 answers
  • this bar is located at the top of your computer school in.Its functions allow you to navigate the web​
    5·2 answers
  • Define a function compute gas volume that returns the volume of a gas given parameters pressure, temperature, and moles. Use the
    7·2 answers
  • The sameNumber method checks to see if the number of words in the phrase, numwords, is the same number of words contained in the
    5·1 answer
  • Anyone know how to delete it in my laptop
    10·1 answer
  • Alex has composed a layout with this Image for a magazine. Which rule of composition has Alex applied?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!