Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a program that repeatedly reads integers from the user until the user enters the word 'stop' (this is called a sentinel value). When the

Write a program that repeatedly reads integers from the user until the user enters the word \\\\\\\'stop\\\\\\\' (this is called a sentinel value). When the user enters the sentinel value, output the following statistics about the sequence of integers: sum, average, sum of even numbers, and the largest number.

For example: Enter a sequence of integers. Enter \\\\\\\'stop\\\\\\\' to exit.

> 1

> 3

> 1

> 3

> 4

> 9

> 3

> stop

Sum: 24

Average: 3.4285714285714284

Even Sum: 4

Largest number: 9

Step by Step Solution

3.54 Rating (158 Votes )

There are 3 Steps involved in it

Step: 1

I will write it in Python Good luck student Starting Python Script c... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems A Practical Approach to Design Implementation and Management

Authors: Thomas Connolly, Carolyn Begg

6th Edition Global

132943263, 978-0132943260

More Books

Students also viewed these Programming questions

Question

Discuss the advantages and disadvantages of database triggers.

Answered: 1 week ago

Question

5. How is the auditory cortex like the visual cortex?

Answered: 1 week ago