Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using Python; Ask user to type numbers one by one; ask for confirmation for every new number. If user types something, that is not a

Using Python;

Ask user to type numbers one by one; ask for confirmation for every new number.

If user types something, that is not a number, print a message and continue asking.

Stop asking if "N" is answered; continue with answer "Y". If the answer is something else, ask again for the correct confirmation until getting "N" or "Y".

Find and print the arithmetic average of entered numbers.

If there are no numbers entered print a message and finish.

Example:

image text in transcribed

I am going to calculate the arithmetic average of your numbers New number? (Y/N) Y Type a number: 4 New number? (Y/N) Y Type a number: 3,5 This is not a number New number? (Y/N) Y Type a number: 3.5 New number? (Y/N) enough Please answer only 'Y' or'N' New number? (Y/N) finish Please answer only 'Y' or'N' New number? (Y/N)N Your average is 3.75 >>> |

Step by Step Solution

There are 3 Steps involved in it

Step: 1

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

Step: 3

blur-text-image

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 Management An Organizational Perspective

Authors: Richard T. Watson

1st Edition

0471305340, 978-0471305347

More Books

Students also viewed these Databases questions

Question

Has the new director lost leadership credibility with the dean?

Answered: 1 week ago

Question

LO4 Provide an overview of four challenges facing HR today.

Answered: 1 week ago