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
nydimaria [60]
4 years ago
9

Create a program that asks the user to enter grade scores. Use a loop to request each score and add it to a total. Continue acce

pting scores until the user enters a negative value. Finally, calculate and display the average for the entered scores.
Computers and Technology
1 answer:
fomenos4 years ago
6 0

Answer:

total = 0

count = 0

while(True):

   grade = float(input("Enter a grade: "))

   if grade < 0:

       break

   else:

       total += grade

       count += 1

       

average = total/count

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

Explanation:

*The code is in Python.

Initialize the total and count as 0

Create a while loop that iterates until a specific condition is met inside the loop

Inside the loop, ask the user to enter a grade. If the grade is smaller than 0, stop the loop. Otherwise, add the grade to the total and increment the count by 1.

When the loop is done, calculate the average, divide the total by count, and print it

You might be interested in
How does an individual's access to a wide range of online services affects their ability to operate safely in the digital world.
S_A_V [24]
Nothing online is safe anymore!!!! People and even the government can get hacked easily with today's technology.You can search someone easily on websites like Google or Facebook and even read someone's tweets on Twitter because their account is not private. But what's the point of saying private if they can easily get hacked by someone. There is no safety these days that is why you have to be careful with what you post on the internet in general.
6 0
3 years ago
Who are the best candidates for members of skills USA?
Kryger [21]

Answer:

Is there more to the question? But I have had this question already and the answer is B)

7 0
3 years ago
Here are some instructions in English. Translate each of them into the Simple Machine language.
Evgen [1.6K]

Answer:

a. LOAD register 3 with the hex value 56

2356

b. ROTATE register 5 three bits to the right.

A503

c. JUMP to the instruction at location F3 if the contents of register 7 are equal to the contents of register 0

B7F3

d. AND the contents of register A with the contents of register 5 and leave the result in register 0

80A5

Explanation:

To translate the English instructions to Machine language we have to consider Appendix C of A Simple Machine Language sheet.

a. LOAD register 3 with the hex value 56

The OP code for LOAD is:

2

Operand is:

RXY

Description is:

LOAD the register R with the bit pattern XY.

In a.

3 represents R

56 represents XY

Now following this we can join OP and Operand together to translate a.

2356

b. ROTATE register 5 three bits to the right

The OP code for ROTATE is:

A

Operand is:

R0X

Description is:

ROTATE the bit pattern in register R one bit to the right X times. Each time place the  bit that started at the low-order end at the high-order end

In b.

5 represents R

three represents X

Now following this we can join OP and Operand together to translate b.

A503

c. JUMP to the instruction at location F3 if the contents of register 7 are equal to the contents of register 0.

The OP code for JUMP is:

B

Operand is:

RXY

Description is:

JUMP to the instruction located in the memory cell at address XY if the bit pattern in  register R is equal to the bit pattern in register number 0.

In c.

7 represents R register

F3 represents XY

Now following this we can join OP and Operand together to translate c.

B7F3

d. AND the contents of register A with the contents of register 5 and leave the result in register 0.

The OP code for AND is:

8

Operand is:

RST

Description is:

AND the bit patterns in registers S and T and place the result in register R

In d.

A represents register S

5 represents register T

0 represents register R

Now following this we can join OP and Operand together to translate d.

80A5

6 0
3 years ago
PLEASE HELP ME
alexira [117]

Answer:

it won't be able to run

Explanation:

because computer runs on physical memory

5 0
2 years ago
Randall is unhappy because the server at his college blocks some emails with attachments, so he is unable to receive a particula
tatiyna
If the school has age restrictions it can read 18+ content but it depends on the school. Viruses as by my past experiences with friends can transfer from anywhere to another place because it disables security connections.

The answer is A.
8 0
3 years ago
Read 2 more answers
Other questions:
  • Which of these IP addresses is not a valid address? a. 199.199.3.3 b. 192.168.258.4 c. 192.168.0.9 d. 10.10.10.40
    13·1 answer
  • On which of the following pointing devices can you control the pointer by sliding your fingertip?
    11·1 answer
  • How do i convert videos on the computer
    10·1 answer
  • A company operates on two types of servers: 2 large servers (L) and 4 smaller servers (S), with a combined total of 64GB RAM. Th
    9·1 answer
  • What do astronomers call a system that is composed of more than two stars?
    9·2 answers
  • Chief technology officers can influence a company's current and future ____.
    9·1 answer
  • Describe the difference between the circumscribed and inscribed options when using the AutoCAD Polygon command
    14·1 answer
  • Route summarization means to make several smaller networks appear as
    6·1 answer
  • Why is it better for a CPU to have more than one cache?
    6·2 answers
  • Hlo Brainlians !!
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!