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
yKpoI14uk [10]
3 years ago
6

Write a program that will input a list of test scores in from the keyboard. When the user enters -1, print the average.

Computers and Technology
2 answers:
never [62]3 years ago
7 0

print("Enter the Scores:")

total = []

while True:

   num = int(input())

   if num == -1:

       break

   total.append(num)

print("The average is:",(sum(total)/len(total)))

I wrote my code in python 3.8. Also, you have to be careful about adding -1 to the total. You don't want to count -1 in the average.

aivan3 [116]3 years ago
3 0

Answer: -1 usually represents infinity.

Explanation:

It would keep going forever and not be able to stop without manually stopping it.

You might be interested in
Write an if-else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to
barxatty [35]

espanol;

Escriba una declaración if-else que asigne 0 a la variable b si la variable a es menor que 10. De lo contrario, debería asignar 99 a la variable b

<h3>respuesta:</h3><h3><u>Una declaración if le dice al programa que ejecute un bloque de código, si una condición es verdadera. En el siguiente código, escribimos un mensaje solo si x es mayor que 0:</u></h3><h3><u>var x = 5;</u></h3><h3><u /></h3><h3><u>if (x > 0) {</u></h3><h3><u>   text('¡x es un número positivo!', 200, 200);</u></h3><h3><u>}</u></h3>

ingles;

Write an if-else statement that assigns 0 to the variable b if the variable a is less than 10. Otherwise, it should assign 99 to the variable b .

<h3> answer:</h3><h3 /><h3>An if statement tells the program to execute a block of code, if a condition is true. In the following code, we write a message only if x is greater than 0:</h3><h3>var x = 5;</h3><h3 /><h3>if (x> 0) {</h3><h3>   text ('x is a positive number!', 200, 200);</h3><h3>}</h3><h3 /><h3 /><h3>xd </h3>
8 0
3 years ago
Write the necessary preprocessor directive to enable the use of the stream manipulators like setw and setprecision Additional No
Ksenya-84 [330]

We would use  #include<iomainp> header file accordingly.

<h3>What is manipulator?</h3>

Helping functions known as manipulators can change the input/output stream. It simply affects the I/O stream using the insertion () and extraction (>>) operators, not the value of a variable.

Special functions known as manipulators can be used in an I/O statement to change a stream's format specifications.

Operators who format the data presentation are known as manipulators.The application should contain the file iomanip.h to access manipulators.The manipulators endl, ws, ends, and flush are those without arguments.

Setw (val), Setfill (c), Setprecision (val), Setbase (val), SetIOS Flags (flag), and ResetIOS Flags are examples of manipulators with arguments (m).

Two categories of manipulators are typically in use: Specified and Unspecified.

To know more about pre-processor, visit:-

brainly.com/question/13100703

#SPJ4

4 0
2 years ago
A related database stores data in the form of______
avanturin [10]

Answer:

Lists.

Explanation:

A relational database stores data in the form of lists.

6 0
3 years ago
What are language standards? At this point in your study of programming, what do they mean to
garri49 [273]
In computing, a programming language specification (or standard or definition) is a documentation artifact that defines a programming language so that users and implementors can agree on what programs in that language mean.
5 0
4 years ago
PLEASE HELP ASAP!!
Licemer1 [7]

Answer:i They automatically display as the first row or column.

Explanation:Go to the "Insert" tab on the Excel toolbar, and then click the “Header & Footer” button in the Text group to start the process of adding a header. Excel changes the document view to a Page Layout view. Click on the top of your document where it says “Click to Add Header,” and then type the header for your document.

7 0
4 years ago
Other questions:
  • ?trophic levelNYIGVU.;/IO9YK7,'0;
    12·1 answer
  • Why are file naming conventions essential
    13·2 answers
  • A database is a collection of ________ data.
    15·1 answer
  • What is booting as used in computers?​
    13·2 answers
  • Which is the fastest CPU and why?
    5·1 answer
  • A network administrator has configured a router for stateless DHCPv6 operation. However, users report that workstations are not
    13·1 answer
  • Which feature of a website takes you to a different part of the website or a totally different website when you click on it? A.
    8·1 answer
  • Without net neutrality, which of these situations might occur? (Select all that apply.) a cable company might charge different b
    5·1 answer
  • Q5: what is the difference between a spreadsheet and a relational database? when would you have to use a relational database ins
    5·1 answer
  • 6) Which of the following an OPERATING SYSTEM? a) Window 7 b) excel c) PowerPoint d) Publisher​
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!