Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

6 Create a code (that is both effective and efficient) that asks the user to enter a sales amount. The code should calculate the effective

image text in transcribed

6 Create a code (that is both effective and efficient) that asks the user to enter a sales amount. The code should calculate the effective discount based on the entered sales amount and the net payable amount, which is the original amount less the discount. Let the discount rate be 20% for values below 20,000 and 50% for values 20,000 and above. Below is a sample output: Enter amount: 10000 Discount: 1000.0 Net Payable Amount: 9000.0 Note: run the code the minimum number of times to make sure that the code does not return any logical errors. Show the output of all these runs. Code and Output 7 Create a variable named count. Initialize this variable with the value 30 . Write a while loop that lists the value of count while its value is greater than 10 . Decrease the value of count by 8 every time. Code and Output 8 Create a function named three_words (), which has three parameters. This function returns strings concatenated with '! !!'. Call three_words (). The output should look like this: '1>!!!!!!!!! ! Code and Output

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

Database Design And Implementation

Authors: Edward Sciore

2nd Edition

3030338355, 978-3030338350

More Books

Students also viewed these Databases questions