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]
3 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]3 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
PLEASE HELP ME!!!!
White raven [17]
The answers are D and A
5 0
3 years ago
Read 2 more answers
To rearrange the data on your hard disk so your computer can run more efficiently, you use ____.
Ratling [72]
A disk optimization program, but they're probably looking for defragmenting program.
5 0
3 years ago
What is digital museum​
umka2103 [35]

Access hundreds of professional development resources for museum professionals. Museum professionals can benefit at any career stage from student to retiree. Student Membership. Industry Membership. Established Since 1906. Museum Memebership. 501(c)3 Nonprofit Org.

7 0
2 years ago
Read 2 more answers
What allows a programmer to write code quickly and efficiently for an action that must be repeated?
Marta_Voda [28]
An literation :))!! i hope u get it right lol
6 0
2 years ago
Read 2 more answers
An administrator is troubleshooting an endpoint whose SIP Registration Status shows "Failed: 403 Forbidden" and must obtain info
Katena32 [7]

Answer:

A and C

Explanation:

To obtain information about the case of the error the engineer would navigte thus:

Endpoint > Log Files > messages.log > (c) VCS > Maintenance > Diagnostics > Incident Reporting > View.

Cheers

8 0
3 years ago
Other questions:
  • In poor weather , you should ___ your following distance.
    12·1 answer
  • Why is it a mistake to put e-mail address of people who don't know each other in the "to:" field
    9·2 answers
  • The sequence of folders to a file or folder is called a(n) ________
    8·1 answer
  • Write the definition of a class Clock. The class has no constructors and three instance variables. One is of type int called hou
    13·1 answer
  • Write a program that asks the user for two file names. The first file will be opened for input and the second file will be opene
    8·1 answer
  • Who invented the machine known as colossus?
    9·2 answers
  • Can both mediated interpersonal communication and mass communication has an ability to reach huge number of recipients or audien
    11·1 answer
  • Calculate the time complexity for the following function in terms of Big O notation. Explain your answer.
    13·1 answer
  • I need help here thanks forever who helps
    7·1 answer
  • What are the benefits and drawbacks of a desktop utilising virtualisation and a server?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!