Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

this is rquirement for all questions Make sure to validate user input for data type, value range and other problem requirements Print output that

"" this is rquirement for all questions Make sure to validate user input for data type, value range and other problem requirements Print output that clearly explains what is being printed (where necessary) o In other words, dont just print a 5 unless its clear what that 5 represents. Import statements should be immediately after the program docstring Make sure to include # line comments (just a few in each program, dont go crazy) Use snake_case (lower case plus underscores) for variables CONSTANT variables must be all upper case and immediately following any import statements Do NOT use functions for this assignment. Modules Allowed You may only import the following modules into your programs and use their methods and attributes, unless first receiving special (and unlikely) permission from your facilitator: math os re string sy """"

the question is : 3.3: Write a Python program does all the following steps: a. Prompt users, as shown in the example below, to enter a threedigit whole number such that the digits are in ascending order and without duplicates. Make sure there is a space between the : and where the user begins typing their input. Valid examples: 123 and 489 Invalid examples: 133 and 174 b. Loops and reprompts the user until a correct value is entered. Checks whether the user entered exactly what is requested in step a. Otherwise prints only one of the 4 specific error messages before reprompting (see example) The input may have more than one error but you stop at the first error you find. c. Informs users when their number is accepted and exits program Additional Rule: There can only be one input prompt in your code. Example Run: Please enter a 3-digit integer: 122 --> Error: Your number contains duplication. Please enter a 3-digit integer: 1234 --> Error: You did not enter a 3-digit number. Please enter a 3-digit integer: 1.23 --> Error: This is not an integer. Please re-enter. Please enter a 3-digit integer: 376 --> Error: The digits are not in ascending order. Please enter a 3-digit integer: 348 Number Accepted!

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

Oracle Database Administration The Essential Reference

Authors: Brian Laskey, David Kreines

1st Edition

1565925165, 978-1565925168

More Books

Students also viewed these Databases questions

Question

5-8 What are the advantages and disadvantages of the BYOD movement?

Answered: 1 week ago