Exercise 1: Write a program that computes the total cost of purchases made, including 15% tax. Write the function total cost that receives the number of items and its prices and return the total cost...


Solve only part b


Exercise 1:<br>Write a program that computes the total cost of purchases made, including 15% tax. Write the<br>function total cost that receives the number of items and its prices and return the total cost to the<br>а.<br>main function.<br>b. Modify your program so that the function is called for as many times as needed for different<br>items entered by the user. First enter how many items you have then Use for loop or while loop<br>Run the code for the following 5 entries: 13, 43, 89, 9, 7, X Where X is your last ID digit. For<br>example, if X-4, then the output will look something like the box on the right:<br>田<br>A Enter the number of items purchased: 5<br>Enter the price $ of item #1 :13<br>Price + Tax of item #1=14.95<br>Enter the price $ of item #2 :43<br>Price + Tax of item #2=49.45<br>Enter the price $ of item #3 :89<br>Price + Tax of item #3=102.35<br>Enter the price $ of item #4 :7<br>Price + Tax of item #4=8.05<br>Enter the price $ of item #5 :4<br>Price + Tax of item #5=4.6<br>Final bill, including tax, is $179.40<br>Page 1 of 2<br>568 words<br>English (United States)<br>K Accessibility: Investigate<br>1706<br>

Extracted text: Exercise 1: Write a program that computes the total cost of purchases made, including 15% tax. Write the function total cost that receives the number of items and its prices and return the total cost to the а. main function. b. Modify your program so that the function is called for as many times as needed for different items entered by the user. First enter how many items you have then Use for loop or while loop Run the code for the following 5 entries: 13, 43, 89, 9, 7, X Where X is your last ID digit. For example, if X-4, then the output will look something like the box on the right: 田 A Enter the number of items purchased: 5 Enter the price $ of item #1 :13 Price + Tax of item #1=14.95 Enter the price $ of item #2 :43 Price + Tax of item #2=49.45 Enter the price $ of item #3 :89 Price + Tax of item #3=102.35 Enter the price $ of item #4 :7 Price + Tax of item #4=8.05 Enter the price $ of item #5 :4 Price + Tax of item #5=4.6 Final bill, including tax, is $179.40 Page 1 of 2 568 words English (United States) K Accessibility: Investigate 1706

Jun 10, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here