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
ludmilkaskok [199]
3 years ago
5

A teacher wants a program to give extra points to students who fail a test. Write a Python program to do the following: (a) Ask

the user to enter 5 test scores. Store the scores in a list. Display the list. (b) Copy all 5 test scores to another list. Use a loop to examine each test score in the new list. If the score is below 60, add 10 extra points to the score. Display the list. (c) Compare the old score and new score of each student. If the old score and new score are different, display the two scores.
Computers and Technology
1 answer:
Lorico [155]3 years ago
8 0

Answer:

Hi there! Please find the answer below.

Explanation:

The program below demonstrates how each of the requirements can be coded in a simple Python script. To copy the array, we can use the copy() method of the array. To calculate the diff, we can use a few different techniques, so I have implemented it using a loop over the arrays and just storing and displaying the difference in the 2 arrays.

new_string.py

def add_test_score(score):

 test_score.append(score);

contact_hash = {}

test_score = []

print("Enter 5 test scores: ");

for x in range(0, 5):

   input_string = input("Enter test score " + str(x + 1) + ": ")

   add_test_score(int(input_string));

print(test_score);

test_score_copy = test_score.copy();

for e in test_score_copy:

   if e < 60:

       test_score_copy[test_score_copy.index(e)] += 10;

diff = [];

for e in test_score:

   print(test_score[test_score.index(e)]);

   print(test_score_copy[test_score.index(e)]);

   if not test_score[test_score.index(e)] == test_score_copy[test_score.index(e)]:

       diff.append(e);

print(diff);

You might be interested in
Jim has just purchased two new SCSI hard disk drives and a controller card for them. He properly installs the hardware in his ma
yawa3891 [41]

Answer:

  • Create partitions on each hard disk drives.
  • Mount the partition created on each hard drive so they are accessible by the the operating system.
  • Format the partitions created with a filesystem recognized by Linux.

Explanation:

Having purchased the two new SCSI hard disk drives with the controller cards for each and installed them properly, before using them for data storage and retrieval he must first use the fdisk command to create one or more partitions on each of the hard disk drives then mount any partitions created on the two hard drives so that they are accessible by the operating system before then proceeding to format any partitions created with a valid filesystem recognized by Linux.

4 0
3 years ago
the_____ tool is used to change the select text to capital letters or small letters (change case /grow font)​
solong [7]

Answer:

on word you can use shortcut "Shift+f3" to change uppercase lowercase and title case if that is what you are asking for

3 0
3 years ago
How does the game Clash Royale keep players continuously active and engaged?
lana [24]

Answer: a

Explanation: because they have to beat and check the players to move on

4 0
3 years ago
A potential customer wants to find out how blockchain can benefit their company and why they should use Accenture’s Multi-party
grandymaker [24]

Answer:

maybe blockchain can help them in term of security

6 0
3 years ago
Achieving quality as excellence is just as important in a service business as it is in a product business. A web services compan
atroni [7]

Answer:

The best answer to the question: Achieving quality as exellence is just as important in service business as it is in product business. A web services company that has a difficult and confusing online interface for consumers to select the services they need could increase its quality by focusing on which attribute?, would be: Ordering ease.

Explanation:

Ordering ease is referred by businesses as the easiness with which a customer can enter a company´s website and order whatever goods, or services he needs from the options offered by the company itself. Applying ordering ease in the case of this web services company means that they will work on the means on their interface that will ensure that a customer can have easy access, and an easy time, choosing and selecting the items, or services, he/she needs, without having to waste hours searching through the site.

5 0
3 years ago
Other questions:
  • Which markup language would be considered the most current for web design? HTLM, HTML5, XHTLM, XHTML 6
    14·2 answers
  • A parent is browsing through a shopping website, looking for blue-colored striped socks for her child. She is fine if the socks
    15·1 answer
  • Write a Program in C language using arrays:
    14·1 answer
  • 6. What is the difference between portrait and landscape orientation? What are the advantages of
    9·1 answer
  • Kim is creating a PowerPoint
    13·1 answer
  • Creating a call conversion in Google Ads and adding a phone snippet to a web page allows advertisers to use a Google forwarding
    11·1 answer
  • What integer is represented by the following 8-bit twos complement representation: 1011 0000 ? (Enter your number in decimal, an
    6·1 answer
  • What would be used by a business to assess how the business is working within its organization goals? O A. Information systems B
    8·1 answer
  • What is the different between information and data
    9·1 answer
  • There's an App for That!
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!