Question
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...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get StartedRecommended Textbook for
Database Systems A Practical Approach to Design Implementation and Management
Authors: Thomas Connolly, Carolyn Begg
6th Edition Global
132943263, 978-0132943260
Students also viewed these Programming questions
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
Question
Answered: 1 week ago
View Answer in SolutionInn App