Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

please The following program first reads an integer age, entered by the user, and keeps asking the user to reenter the age if the entered

image text in transcribed

image text in transcribed

please

The following program first reads an integer age, entered by the user, and keeps asking the user to reenter the age if the entered age is not between 18 and 120. Then, it computes and displays the discounted price (to 2 decimals points) for daily renting the car, according to the entered age. Assume the original price is OMR 100 for daily renting a car and assume that the program processes the conditions in the following order. 5% discount if the age is above or equal to 18 and less then 24 10% discount if the age is above or equal to 24 and less than 30 15% discount if the age is above or equal to 30 and less than 40 20% discount if the age is above or equal to 40 To solve the problem, drag and drop the appropriate statements shown below in the right missing parts of the program code above. NB: Some statements can be used more than once. ###### ########## if age >= 18 and age = 30 and age 120 : elif age > 24 and age = 24 and age = 30 and age 120: age = int (input("Enter your age: ")) ORIGINALPRICE = 100 discountedPrice = 0.20 * ORIGINALPRICE || discountedPrice = 0.10 ORIGINAL PRICE discounted Price discountedPrice = 20 ORIGINALPRICE discountedPrice = 15* ORIGINALPRICE 0.5 * ORIGINALPRICE discountedPrice discountedPrice = 0.05 ORIGINALPRICE discountedPrice = 5 * ORIGINALPRICE 10 - ORIGINALPRICE discounted Price = 0.15 ORIGINALPRICE

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_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

Refactoring Databases Evolutionary Database Design

Authors: Scott Ambler, Pramod Sadalage

1st Edition

0321774515, 978-0321774514

More Books

Students also viewed these Databases questions

Question

Know how procedures protect an organization

Answered: 1 week ago

Question

Question What is a Roth 401(k) feature?

Answered: 1 week ago

Question

Question Can employees make contributions to a profit sharing plan?

Answered: 1 week ago