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]
3 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]3 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
Do you agree that Facebook is the best social media platform to use for interpersonal communication? Why or why not?
xxTIMURxx [149]
I think it is but it isn't as well, it could bring friends together but it could also split friendships.
4 0
3 years ago
Read 2 more answers
Jordan says she cant access files on the server any more. No other user has reported this problem and she can PING the server fr
kramer

Answer:

Lan cable was disconnected or unplugged from jordan's PC

Explanation:

According to the scenario, no user other than Jordan has reported the problem which means that there was no issue in the network or server.

As IP address ping of 127.0.0.1 was successful means that the configuration of the IP address was also correct and the DHCP server was working correctly.

After all assessment one of the main cause could be the disconnection of the LAN cable from Jordan's computer.

6 0
3 years ago
After which problem-solving stage should you take action?
Mumz [18]

Answer:

Option: Making a choice

Explanation:

In a problem solving process, it starts with defining a problem which is the first step that we need to identify the issue.

After that, we should gather the information on the issue that we identify. For example, we are root cause of the problem, what are the possible solutions etc.

Next, we evaluate the information that we collect (e.g. pro and cons of a particular solution).

Next, we make a choice on the solution that we are going to take after further evaluation on all the options we have.

Only after we make a choice, then we can take action based on our chosen solution to solve the problem.

4 0
3 years ago
Suppose you have data that should not be lost on disk failure, and the application is write-intensive. How would you store the d
natita [175]

Answer:

use RAID 5

Explanation:

The best option in this scenario would be to use RAID 5, this would all but eliminate the risk of losing the data. As you would need at atleast 3 seperate drives which would all act as backups for each other. Therefore, in the unlikely case that one of the drives were to fail or data were to become corrupt/lost the other drives would have a backup of that data which ca be used.

7 0
3 years ago
PLS HURRY!!<br> Look at the image below
MrRa [10]

Answer:

1. A function can use variables as parameters.

2. A function can have more than one parameter.

3. The definition of a function must come before where the function is used.

Explanation:

<u>The definition of a function can come before or after it is used</u> - I am pretty sure it cannot be placed after the function is being used. It should always come before it is used, so this statement is false.

<u>A function can use variables as parameters</u> - this is true, variables are just labels to hold data.

<u>A function can have more than one parameter</u> - this is true.

<u>A function must have a return value</u> - functions do not always have to <em>return</em> values. It could simply print, so this statement is false.

<u>The definition of a function must come before where the function is used</u> - As said earlier, the definition of functions must come before it is used/called. This statement is true.

Hope this helps :)

7 0
3 years ago
Other questions:
  • Choosing the “Quick Print” button will ____________.
    14·1 answer
  • A(n) ____ backup only archives the files that have been modified since the last backup.
    11·1 answer
  • Who<br> invented the term “debugging”?
    14·2 answers
  • The LTE (cellular telephone) standard supports only packet switching"". What cellular services are morst affected by this change
    15·1 answer
  • What is TCP/IP's Transport layer's primary duty?
    8·1 answer
  • What special member function of a class is called whenever an instance of a class is created and initialized?
    15·1 answer
  • Which of the following is not a general strategy for organizing and analyzing qualitative data?a.Convert the data into one or mo
    6·1 answer
  • Why is a class called a factory of objects
    11·1 answer
  • A. Requiring computer users to log off before leaving for lunch
    11·1 answer
  • What does Digital Citizenship mean to you?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!