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
Mice21 [21]
3 years ago
5

Write a program that gets five integer test scores from the user, calculates their average, and prints it on the screen. Test yo

ur program with the following data: Run 1: 40, 80, 97, 32, 87 Run 2: 60, 90, 100, 99, 95 Run your program and copy and paste the output to a file. Create a folder named, fullname_program2. Copy your source code and the output file to the folder. Zip the folder and upload it to Blackboard.
Computers and Technology
1 answer:
Alex3 years ago
5 0

Answer:

total = 0

for i in range(5):

   score = int(input("Enter a score: "))

   total += score

average = total / 5

print("The average is " + str(average))

Explanation:

*The code is in Python.

Initialize the total as 0

Create a for loop that iterates five times. Inside the loop, ask the user to enter a score. Add the score to the total (cumulative sum)

After the loop, calculate the average, divide the total by 5

Print the average

You might be interested in
A. Requiring computer users to log off before leaving for lunch
GuDViN [60]

Answer:

Option A, B, and D.

Explanation:

In the above question, the some details of the question are missing that is the part of the question.

Information Security applies to the mechanisms and techniques built and maintained to secure print, computerized, or any other type of personal, secret and confidential information or records from unauthorized access, usage, exploitation, release, damage, manipulation, or disturbance.

So, the following are the option that is true about the scenario.

Other option is not true about the scenario because Option C the click fraud are not the part or protect from the information security and Option F is not considered to the following scenario.

7 0
3 years ago
Assume the following variable definition appears in a program:
AnnZ [28]

Answer:

cout << setprecision(2)<< fixed << number;

Explanation:

The above statement returns 12.35 as output

Though, the statement can be split to multiple statements; but the question requires the use of a cout statement.

The statement starts by setting precision to 2 using setprecision(2)

This is immediately followed by the fixed manipulator;

The essence of the fixed manipulator is to ensure that the number returns 2 digits after the decimal point;

Using only setprecision(2) in the cout statement will on return the 2 digits (12) before the decimal point.

The fixed manipulator is then followed by the variable to be printed.

See code snippet below

<em>#include <iostream>  </em>

<em>#include <iomanip> </em>

<em>using namespace std;  </em>

<em>int main()  </em>

<em>{  </em>

<em> // Initializing the double value</em>

<em> double number = 12.3456;  </em>

<em> //Print  result</em>

<em> cout << setprecision(2)<< fixed << number;  </em>

<em> return 0;  </em>

<em>}  </em>

<em />

4 0
3 years ago
If you are trying to reduce the cost of college which of the following strategy is likely to save you the most money
Allisa [31]
A scholarship of any kind will work because the college pays u money and a loan will take forever to pay back and u might be in debt for a long time
7 0
3 years ago
Read 2 more answers
¿Cuáles son los 5 Procesadores de textos on line más usados?
labwork [276]

Answer:

5 Procesadores de textos

Explanation:

Google Docs.

Textilus - Edición Microsoft Word.

TextEdit.

Kingsoft Office Writer.

Páginas.

8 0
3 years ago
Read the excerpt from The Common Sense of Bicycling: Bicycling for Ladies. To learn to balance, have the saddle raised as high a
kirill [66]

The answer is adjusting the seat.

3 0
3 years ago
Read 2 more answers
Other questions:
  • An important advantage of using GUI data-entry objects is that you often can control what users enter by limiting their options?
    6·1 answer
  • Soo...My Old 3DS XL haven't been touched in around a year...So i tried to charge it but no LED lights opened..Even the power but
    14·1 answer
  • Average of Grades - Write a program that stores the following values in five different variables: 98, 87, 84, 100, 94. The progr
    8·1 answer
  • Choose all the answers that apply.
    15·1 answer
  • the two main ways in which marketers address the competition with their strategies are by satisfying a need better than a compet
    6·2 answers
  • The construction of a mixed media assemblage would be considered
    9·1 answer
  • A marketing firm has been hired to help a client understand how their online brand is perceived. The firm has set up a system to
    14·1 answer
  • What are some things that games were historically used for?
    7·1 answer
  • Write a Python function that join the two string and print it ​
    14·2 answers
  • 11.6 Code Practice edhesive
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!