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
miss Akunina [59]
3 years ago
13

Assign sum_extra with the total extra credit received given list test_grades. Full credit is 100, so anything over 100 is extra

credit. For the given program, sum_extra is 8 because 1 0 7 0 is 8. Sample output for the given program with input: '101 83 107 90'

Computers and Technology
1 answer:
Bond [772]3 years ago
6 0

Answer:

Here is the Python program:

test_grades = [101, 83, 107, 90]      # list of test grades

sum_extra = 0  # stores total sum of extra credit

for i in test_grades:  #loop to check extra credit in test grades

   if i > 100:  # if grade is greater than 100

       i = i - 100  # 100 is subtracted from grade

   else:  # otherwise

       i = 0  

   sum_extra = sum_extra + i #adds i to to sum_extra

print('Sum extra is:', sum_extra) # prints the value of sum_extra

Explanation:

This program assigns sum_extra with total extra credit received in list test_grades. Lets see how this program works step wise.

We have a list with the following elements 101, 83, 107 and 90

sum_extra is initialized to 0

For loop has variable i that works like an index and moves through the list of test_grades

First i is positioned at 101. If condition in the loop checks if the element at i-th position is greater than 100. It is true because 101 > 100. So 100 is subtracted from 101 and i becomes 1. So this statement is executed next sum_extra = sum_extra + i

                  =  0 + 1

So the value of sum_extra = 1

Next i is positioned at 83. If condition in the loop checks if the element at i-th position is greater than 100. It is false to i become 0.So this statement is executed next sum_extra = sum_extra + i

                  =  1 + 0

So the value of sum_extra = 1

Next i is positioned at 107. If condition in the loop checks if the element at i-th position is greater than 100. It is true because 107 > 100. So 100 is subtracted from 107 and it becomes 7. So this statement is executed next sum_extra = sum_extra + i

                  =  1 + 7

So the value of sum_extra = 8

Next i is positioned at 90. If condition in the loop checks if the element at i-th position is greater than 100. It is false to i become 0.So this statement is executed next sum_extra = sum_extra + i

                  =  8 + 0

So the value of sum_extra = 8

So the output of the above program is 8.

Output:

Sum extra is: 8

You might be interested in
In HTML, an opening tag and its closing tag must appear on the same line. True Or False​
DaniilM [7]

Answer:

the answer is true, you cannot break the element apart EVERR!!!!!

3 0
2 years ago
Why might you need to convert a file to another file type
Alex17521 [72]
This depends on what program you're using. Some programs can only read certain files exclusive to that program, such as .psd files can usually only be read in Photoshop or other adobe programs. Many fields of work (Journalism, the Arts, Design, etc.) ask for .psd files to be converted to either .png, .jpg, or .tiff so that it can be seen on many other platforms.

For images especially, files are more compatible either on a program or printed. for example, .png files are good for storing color data from computer to computer, but if you print a .png file, the quality is poor. hence it's recommended to save files you want to print for designs as .jpeg, because .jpeg can more easily be printed and will then be presented at a high quality.

Sometimes color quality changes depending on CMYK as well but that's a whole other ball of wax.
8 0
3 years ago
Press ____ to select the entire worksheet.<br> F1<br> F4<br> ALT+A<br> CTRL+A
andreev551 [17]
<span>The answer is CTRL + A, this selects whole worksheet (A means all). In computing, a Control key is a transformer key which, when pushed in combination with one more key, achieves a singular operation (for example, Ctrl + A; like the Shift key, the Control key infrequently achieves any purpose when pushed by itself.</span>
5 0
3 years ago
Select the correct answer.
aliina [53]

Answer:

B

Explanation:

engineers design and carry out test cases and evaluate exit criteria (by following the scope set in the planning phase). They create bug reports describing detected defects and report to the stakeholders on the test findings and the completion status. Testing may be repeated to check for errors.

7 0
3 years ago
Write a class of complex numbers consisting of:
Gnom [1K]

Answer:

hi sorry for not knowing the answer

but please follow have a great day,night, or afternoon

3 0
3 years ago
Other questions:
  • How much does a Canon PowerShot G7X cost in America?
    14·1 answer
  • Given the following sets, for each set operation provide the elements of the resulting set in set notation or using a well-known
    5·1 answer
  • Students who finish their homework after school are meeting a. intrapersonal and short-term goals b. normative and short-term go
    13·2 answers
  • A trust domain is defined as Select one: a. The agreed upon, trusted third party b. A scenario where one user needs to validate
    5·2 answers
  • A communication medium that carries a large amount of data at a fast speed is called
    6·1 answer
  • What is the first step a user should take toward generating an index?
    7·1 answer
  • You need to replace a broken monitor on a desktop system. You decide to replace it with a spare monitor that wasn't being used.
    15·2 answers
  • Which media vehicle uses the Dreamweaver software for its design? A(n) "blank" uses the Dreamweaver software for its design.
    8·1 answer
  • How was data put into the Tabulating Machine?
    7·1 answer
  • How do I write a good personal narrative pls help im struggling very hard rn.​
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!