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
What is the output of this Python code?
Simora [160]

Answer:

True

Explanation:

in function guess:- a = x; b = y; c = z

so 45 > 31 AND 45 < 38

since both the stements are true

True is printed

8 0
3 years ago
Ping pc-b from a command prompt window on pc-a. were the pings successful? why?
love history [14]
If the pings are successful you are either on the same subnet and everything is configured correctly or ICMP echo is enabled on the router which it should be by default internally. Externally, ICMP can/should be disabled to avoid DOS attacks.
7 0
3 years ago
Volume of a cuboid is 14400 ​
Yanka [14]

Answer:

WHAT?

Explanation:

8 0
3 years ago
What is a grant cycle?
Lina20 [59]

Answer:

The grant lifecycle refers to the entire process a grant goes through—from creating the opportunity through implementation and ending with the closeout.

Explanation:

... The grant lifecycle is comprised of three distinct phases: Pre-Award, Award, and Post Award. Hope that this helps you and have a great day :)

5 0
3 years ago
Read 2 more answers
The period of time during which an IDPS monitors network traffic to observe what constitutes normal network behavior is referred
horrorfan [7]

Answer: Training period

Explanation:

The training period is refers to the period of time where we can monitor all the network traffic and also observe all the networking behavior with the constitute.

  • During the training period we get a proper training about the specific topic and also get a chance to learn various types of things.

 According to the given question, in the training period an IDPS monitor is used observing the networking traffic and the network behavior. Therefore, raining period is the correct answer.

 Therefore, Training period is the correct answer.

5 0
3 years ago
Other questions:
  • Which of the following statements about the OSI is FALSE?A. The OSI model encourages modular design in networking.B. Each protoc
    8·1 answer
  • What is the division method?
    15·1 answer
  • What is green computing in non-technical term?​
    15·1 answer
  • Which of the following lists contains the five essential elements of a computer? Group of answer choices: 1. inputs, returns, pr
    11·1 answer
  • In total, how many 8-bit registers are there in the Intel 80x86 CPU design presented in class? Name one of these 8-bit registers
    9·1 answer
  • Write an expression that computes the integer average of the int variables exam1 and exam2 (both declared and assigned values).
    15·1 answer
  • Which protocol sends a request to view or download a website or file ​
    7·1 answer
  • Classify the various scenarios in a web development team that is creating a website for a client according to the priority level
    9·1 answer
  • How should excel Identify social security numbers: as a text, numbers, or date and time? Why?
    11·2 answers
  • Write the icon of full justification​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!