Write a Python program to calculate the bill VAT and store the bill information into a...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Write a Python program to calculate the bill VAT and store the bill information into a file. Ask the user to enter three products with their prices then save them in tuples. (1 mark) Calculate the total price of the products with VAT of 15%. (2 mark) Create a file with "Bill.txt" name and save the bill information (product name, price, total price with and without VAT) into the "Bill.txt" file. (2 mark) Note: Hint: The product: 1- Milk The Price: 10.5 2- Egg 23.2 3- Chicken 135 4- Bread 6.5 Sample Run1 Enter the product: Milk Enter the Price: 10.5 Enter the product: Egg Enter the Price: 23.2 Enter the product: Chicken Enter the Price: 135 VAT VAT * taxable_amount Activate Go to Sett Write a Python program to calculate the bill VAT and store the bill information into a file. Ask the user to enter three products with their prices then save them in tuples. (1 mark) Calculate the total price of the products with VAT of 15%. (2 mark) Create a file with "Bill.txt" name and save the bill information (product name, price, total price with and without VAT) into the "Bill.txt" file. (2 mark) Note: Hint: The product: 1- Milk The Price: 10.5 2- Egg 23.2 3- Chicken 135 4- Bread 6.5 Sample Run1 Enter the product: Milk Enter the Price: 10.5 Enter the product: Egg Enter the Price: 23.2 Enter the product: Chicken Enter the Price: 135 VAT VAT * taxable_amount Activate Go to Sett
Expert Answer:
Related Book For
Guide To Java A Concise Introduction To Programming
ISBN: 978-3031228414
2nd Edition
Authors: James T. Streib, Takako Soma
Posted Date:
Students also viewed these programming questions
-
can someone solve this Modern workstations typically have memory systems that incorporate two or three levels of caching. Explain why they are designed like this. [4 marks] In order to investigate...
-
You are required to write a Python program that will manage character (heroes and villain) information. Character (hero and villain) information will be stored in a text file that will be read in...
-
1. Analyze whether Thomas can recover his mReport You Need To Prepare: You must prepare a report addressed to Winnie and Ralph. Winnie and Ralph will use the report in discussion with the Clean...
-
Industrial Maids Service Ltd. (IMS) is a corporation based in Sarnia, Ontario that focuses on cleaning commercial properties, which is a very competitive business. Although IMS tries to recruit...
-
1. What do you think were the direct and indirect benefits of Ashok Vaswanis initiatives to involve Barclays employees in the strategy? 2. If you were a smaller company, without the information...
-
What is DT&E?
-
A group of developers is building a new shopping center. A consultant for the developers has constructed the CPM/PERT network below and assigned activity times in weeks. Determine the earliest start...
-
1. Suppose that the following are the five shares in a (3,5)- Shamir Threshold Scheme implemented in Z101. 2 Xi Yi 1 1 35 2 15 47 32 69 4 29 23 53 (a) Determine the secret? (8 Pts.) 8 (b) Having...
-
You work in the human resources department of your company helping new employees fill out the necessary paperwork to get their first paycheck. There are a number of decisions that employees must make...
-
Define a query 2. Distinguish between primary key constraints and foreign key constraints 3. Why are entity and referential important in a database
-
Consider the populations given in Problems 33-36. a. Find the standard divisor. b. Find the standard quota for each precinct. c. Total, rounding the standard quotas up. d. Find a modified divisor...
-
A focus group of 33 people for \(A B C T V\) were asked to rank the government spending priorities of education \((\mathrm{E})\), military spending \((\mathrm{M})\), health care \((\mathrm{H})\),...
-
Consider the populations given in Problems 29-32. a. Find the standard divisor. b. Find the standard quota for each precinct. c. Total, rounding the standard quotas down. d. Find a modified divisor...
-
In Problems 23-26, apportion the indicated number of representatives to two states, A, and B, using Hamilton's plan. Next, recalculate the apportionment using Hamilton's plan for the three states,...
-
Consider the populations given in Problems 29-32. a. Find the standard divisor. b. Find the standard quota for each precinct. c. Total, rounding the standard quotas down. d. Find a modified divisor...
-
Suppose an economist believes that the price level in the economy is directly related to the money supply, or the amount of money circulating in the economy. The economist proposes the following...
-
Ann hires a nanny to watch her two children while she works at a local hospital. She pays the 19 year-old nanny $125 per week for 48 weeks during the current year. a. What is the employers portion of...
-
Repeat the previous exercise using a case structure instead of a selection structure. Data From previous exercise Write a code segment to ask a user to enter a number between 1 and 12 , and print the...
-
Determine the output from the following code segment: int sum; int count; sum 0; count = 1; while (sum < 10) { } sum sum + count; count++; System.out.println ("sum = System.out.println("count...
-
Write both serial code and parallel code to perform vector addition. Plot execution times of several runs with a different number of threads and to see the speed up.
-
Entrepreneur magazine ranks franchises. Among the factors that the magazine uses in its rankings are growth rate, number of locations, start-up costs, and financial stability. A recent ranking listed...
-
The following 20 observations are for two quantitative variables, x and y. a. Create a scatter chart for these 20 observations. b. Fit a linear trendline to the 20 observations. What can you say...
-
The file colleges contains the following data for the sample of 102 private colleges: year founded, tuition and fees (not including room and board), and the percentage of undergraduates who obtained...
Study smarter with the SolutionInn App