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
jeka94
4 years ago
5

Write a MARIE program to calculate some basic statistics on a list of positive numbers. The program will ask users to input the

numbers one by one. Assume that all numbers will be in the range 1 to 1000. To terminate the data entry, user will input any negative number. Once the data entry is complete, the program will show four statistics about the list of numbers: (1) Count (2) Minimum value (3) Sum of numbers (4) "Mean/Average" calculation.
As an example, if the user enters the following decimal numbers as input (one after the other)

23, 6, 78, 36, 3, 250, 127, 210, –5

the program would output the following values as the count, minimum, sum and mean respectively:

8
3
733
91

The average is calculated by dividing sum by count. Note that MARIE does not support floating point numbers, hence the result of division will only have the integer part (as shown in above example, average is 91 instead of 91.625)

A simple algorithm for implementing division in MARIE is shown below.

Let x = dividend, y = divisor, z = quotient (result) of division.

set initial z to 0
while x > y, do
set x to (x – y)
increase z by 1
endwhile

Assume that the user will always provide valid numbers as input, that is, do not worry about dealing with invalid input data.

Write comments within your program so that a reader can understand it easily.
Computers and Technology
1 answer:
motikmotik4 years ago
5 0

Answer:

a=[23,6,78,36,3,250,127,210,-5]

i = len(a) # calculate length

j = min(a) # calculate minimun

k = sum(a) # calculate sum

l= sum(a)/len(a)  # calculate mean

print(i)

print(j)

print(k)

print(l)

z = 0.0

i=0

x=[23,6,78,36,3,250,127,210,-5]

y = int(l)

while x[i] < y:  

   z= int(x[i]/y)

   print(z)

   x[i] = x[i] - y

   z=z+1

   i=i+1

Explanation:

So above we have calculated Count, minimum, sum and mean/average. Also we did a simple division and printed quotient.

You might be interested in
Disadvantage do you think one can have if he or she does use electronic media
Dima020 [189]
- discontinuity
- dependence on the electric power
and more
6 0
3 years ago
Yuri, a medical assistant, has been asked to send an account of a patient's last office visit to another doctor's office. The te
g100num [7]
The internet,,

To let the other doctor know about specific details on the patient, and other excessive information.

Hope this helps!! :)
6 0
3 years ago
Read 2 more answers
During the system investigation stage, __________ studies are done to determine if the hardware, software, and communications co
oksano4ka [1.4K]

Answer:

The correct answer is "Technical Feasibility".

Explanation:

System investigation is used to Review that whether the system is feasible or not for the proposal that they will design or creating.in the system investigation stage, we do the technical feasibility. The technical feasibility is used to check technical resources like hardware, software, etc in the organization.

The  Technical Feasibility in the System investigation  is used to solve the problem of business

6 0
4 years ago
Explain three ways you can get home safely if the friend you rode with has drugs or alcohol in his or her system and you prevent
Lelu [443]
You could organised to be picked up, call a taxi or a sober peer or take public transport.
7 0
4 years ago
What are slicers used for?
Pachacha [2.7K]

Answer:

Quickly filtering data

Explanation:

Just did the Excel instruction for Edge 2021

Plz click the Thanks button

<Jayla>

4 0
3 years ago
Other questions:
  • This question involves the creation of user names for an online system. A user name is created based on a user’s first and last
    13·1 answer
  • Which of the following is NOT a view which can be chosen for a presentation?
    15·1 answer
  • Which of these is important to consider before believing health or fitness information you find online? Where the information wa
    5·2 answers
  • What are the basic problem that my pc can have?
    14·1 answer
  • Assign True to the variable is_ascending if the list numbers is in ascending order (that is, if each element of the list is grea
    6·1 answer
  • Practice problems on functions. Write C function(s) to carry out the specified tasks. For each problem, also write the suggested
    15·1 answer
  • A router is a peripheral that may need troubleshooting if the network goes down.
    12·2 answers
  • Open the same text file that you have created in Exercise-Four ( in the sample output, I have created the file name personal). W
    7·1 answer
  • If you are to enhance the ICT used by your teachers, how will ypu do it? Will you use the same ICT or will you modify how it was
    11·1 answer
  • What do the last two steps in the cyclical design process most likely involve
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!