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
77julia77 [94]
4 years ago
7

Exercise 8.1.9: Diving Contest Your school is hosting a diving contest, and they need a programmer to work on the scoreboard! Yo

ur job is to calculate each diver'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 can someone help?
Computers and Technology
1 answer:
vampirchik [111]4 years ago
4 0

Answer:

def calculate_score(theTuple):

    first, second, third = theTuple

    if first >= 0 and first <=10 and second >= 0 and second <=10 and third >= 0 and third <=10:

         print(first + second+third)

    else:

         print("Range must be 0 to 10")

Explanation:

This line defines the function

def calculate_score(theTuple):

This line gets the content of the function

    first, second, third = theTuple

The following if condition checks if the digits are in the range 0 to 10

    if first >= 0 and first <=10 and second >= 0 and second <=10 and third >= 0 and third <=10:

This calculates the sum

         print(first + second+third)

else:

If number is outside range 0 and 10, this line is executed

         print("Range must be 0 to 10")

You might be interested in
HELP PLEASE ⚠️⚠️⚠️⚠️⚠️⚠️⚠️❗❗❗❗❓❓❓<br> Why does it matter that we protect African Wild Dogs?
pshichka [43]

Explanation:

African wild dogs are among the most effective predators in the world. They use extraordinary cooperation and teamwork to pursue, overhaul and bring down their prey.African wild dogs are struggling to cope with the rapid increase in human settlements and infrastructure development that are encroaching on their traditional range. They are perfectly adapted to their natural environment, but require vast territories to survive – much larger than most other carnivore species. This increased exposure to human contact poses numerous threats to the wild dogs’ survival.

If you have any questions revolving around this topic,feel free to ask me and I will be glad to help,Good luck!

4 0
3 years ago
Read 2 more answers
An artificial satellite in which people can live and work for long periods is called a
morpeh [17]
A space station is an artificial satellite in which people can live and work for a long period of time. Space station is placed on the space for the astronaut in researching things on the space and universe.
8 0
3 years ago
Read 2 more answers
________ is the application of statistical techniques to find patterns and relationships among data for classification and predi
Finger [1]

Answer:          

Data Mining

Explanation:

  • Data Mining is also called knowledge discovery.
  • It is a computer aided technique of searching and evaluating a bulk of data in order to obtain useful information.
  • This technique searches through the data to find hidden patterns and uses statistical methods to find relationship among data for finding predictive information and for classification of data.
  • This is a mixture of different disciplines which include machine learning, statistics and artificial intelligence and also some mathematical methods.
  • Often the useful information is extracted from enormous database using modeling technique which is used to build a model from instances of the data where the solution is known and later apply this model on the instances where the solution is unknown.
  • In unsupervised data mining, the data analysis is not done by using modeling technique. In other words the labels are provided in order not draw inferences and prediction from data sets. Example is clustering.
  • In supervised data mining the model is developed to make inferences and classification. Example is neural networks.
  • For example data mining is used in Medicine industry to provide more accurate diagnostics and treatments on the basis of patient's medical history , physical examination or different patient tests data.
  • Data mining also makes it possible to manage health resources more efficiently and cost-effectively by detecting risks, predicting diseases in certain sections of the population or predicting hospitalization duration.
4 0
4 years ago
A growling noise is heard only when the driver exerts force on the clutch pedal. No noise is heard when the clutch pedal is up.
frosja888 [35]
Technician B is correct when you can hear growling only when the driver exerts force on the clutch pedal but not when it is up the Shaft Bearing is defective


3 0
3 years ago
What would the internet be like today if there was no World Wide Web?
Anvisha [2.4K]

Answer:

Non existent probably

Explanation:

3 0
3 years ago
Other questions:
  • What will be the output of “AAAAMMMMMHHHVV” using a file compression technique?
    9·2 answers
  • What is the primary purpose of a business plan? To file for incorporation To help you identify your goals and plan how you will
    6·1 answer
  • Syah work as senior designer in creative design company. he is an imaginative person and always updates himself with the latest
    15·1 answer
  • Problems of mobile phones
    8·1 answer
  • Can Anyone put my name in binary code using these images? Bentley is my name
    8·1 answer
  • Using truth table, prove that:<br><br> (A + B). C = (A . C)+ (B .C) ?
    7·1 answer
  • Which UML relationships should be used between a subclass and a superclass? For example, suppose there is an interface or abstra
    5·1 answer
  • Which of the following networks had these two goals: a) allowing scientists to work together on scientific projects; and, b) fun
    8·2 answers
  • The minimum recommended standards for the operating system, processor, primary memory (RAM), and storage capacity for certain so
    9·1 answer
  • 1.1 give five (5) reasons why modeling is an important part of system analysis and design
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!