Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3.1 (Validating User Input) Modify the script of Fig3.3. to validate its inputs. For any input, if the value entered is other than 1 or

3.1 (Validating User Input) Modify the script of Fig3.3. to validate its inputs. For any input, if the value entered is other than 1 or 2, keep looping until the user enters a correct value. Use one counter to keep track of the number of passes, then calculate the number of failures after all the users inputs have been received. Hint: Use a While loop to test if the value entered is not equal to 1 and not equal to 2

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 Processing

Authors: David M. Kroenke

12th Edition International Edition

1292023422, 978-1292023427

More Books

Students also viewed these Databases questions