Question: 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

 6 Create a code (that is both effective and efficient) that

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!