A small business has a website that customers can use to order flowers online by selecting products. An invoice is generated at the checkout page. The total cost to the customer is the cost of the flowers, plus the VAT rate of 20%, plus a fixed delivery charge of £2.50 if the customer lives further than 10km away.A program has been written to calculate the total cost of an order and then output this to the invoice.01 cof = float(input('Enter cost of flowers: '))02 tc = (cof * 1.2)03 d = float(input('Enter distance: '))04 if d > 1005 tc = (tc + 2.50)06 else07 print('No delivery charge')08 print(tc)Describe what is meant by iterative testing.[2]
Question
A small business has a website that customers can use to order flowers online by selecting products. An invoice is generated at the checkout page. The total cost to the customer is the cost of the flowers, plus the VAT rate of 20%, plus a fixed delivery charge of £2.50 if the customer lives further than 10km away.A program has been written to calculate the total cost of an order and then output this to the invoice.01 cof = float(input('Enter cost of flowers: '))02 tc = (cof * 1.2)03 d = float(input('Enter distance: '))04 if d > 1005 tc = (tc + 2.50)06 else07 print('No delivery charge')08 print(tc)Describe what is meant by iterative testing.[2]
Solution
Iterative testing is a testing methodology where the program is tested at each stage (iteration) of its development. This is done to ensure that the program is working correctly and as expected at each stage. It involves testing individual parts of the code (units) as they are developed, then testing how these units work together (integration testing), and finally testing the whole system. This process is repeated (hence the term 'iterative') until the program is fully developed and all bugs and issues have been identified and fixed. This method allows for early detection and resolution of issues, making the final product more reliable and efficient.
Similar Questions
Write code that allow the user to enter the price of an item and the quantity. The program should calculate it and print total including VAT using the following formula: Total = Price * Quantity * 1.1For example, if the user enters 2 as price and 5 for quantity, then the program will print "Total price with VAT: 11.0"
Jerry's Flowers had the following cost information related to its purchases of merchandise. Calculate the total cost of merchandise purchased using the information below: Invoice cost of merchandise purchases$100,000Purchase discounts received$ 9,000Cost of transportation-in (shipping)$ 500Costs of purchase returns and allowances$ 400Multiple choice question.$90,100$91,900$109,900$91,100
Problem StatementMaria loves shopping and is curious to know the total cost of her favorite items. She intends to purchase t items, each priced at p rupees, with a progressive increase of 5 rupees for every subsequent item.Write a program that takes the price of one item (p) and the number of items (t) as input, calculates the total cost using the formula (t/2) * (2p + (t-1) * 5), and displays the result.Input format :The first line of input consists of a float value p, representing the price of an item.The second line of input consists of an integer t, representing the number of items.Output format :The output displays "Rs. " followed by a float value, representing the total cost in rupees, rounded off to two decimal places.Refer to the sample output for formatting specifications.Code constraints :In this scenario, the test cases fall under the following constraints:10.0 ≤ p ≤ 1000.01 ≤ t ≤ 100Sample test cases :Input 1 :10.03Output 1 :Rs. 45.00Input 2 :720.056Output 2 :Rs. 48020.00
Ann started her own grocery-delivery service. The amount of money she charges for a delivery depends on the total price of the groceries. Ann uses a function of the form f(x)=mx+b, where m and b are constants, to determine the delivery fee for groceries that cost x dollars. This table shows two values of the function.x f(x)50 1675 19Find an expression for f(x). Write your answer in the form f(x)=mx+b, where m and b are integers or decimals. Do not round.
Problem StatementLilly went shopping with a budget of Rs. 10,000 to buy clothes, and accessories. The cost of clothes is twice the value of accessories, and there is an additional expense of Rs. 1000 for fuel. Develop an expense calculator by inputting the amount spent on accessories, then calculate and display Lilly's remaining amount rounded to two decimal places after her shopping.ExampleInput:2000.0Output:3000.0Explanation:budget = 10000.0;fuel = 1000.0;accessories = 2000.0clothes = 2 * accessories = 2 * 2000 = 4000.0total = clothes + accessories + fuel = 4000.0 + 2000.0 + 1000.0 = 7000.0remaining = budget - total = 10000.0 - 7000.0 = 3000.0Input format :The input consists of a float value a, representing the amount spent on accessories.Output format :The output prints the remaining budget after shopping, rounded to two decimal places in the following format: "Rs. [remaining amount]". Refer to the sample output for the formatting specifications.Code constraints :In this scenario, the test cases fall under the following constraints:10.0 ≤ a ≤ 3000.0Sample test cases :Input 1 :10.0Output 1 :Rs. 8970.00Input 2 :2000.0Output 2 :Rs. 3000.00Input 3 :3000.0Output 3 :Rs. 0.00Input 4 :1578.89Output 4 :Rs. 4263.33Note :The program will be evaluated only after the “Submit Code” is clicked.Extra spaces and new line characters in the program output will result in the failure of the test case.
Upgrade your grade with Knowee
Get personalized homework help. Review tough concepts in more detail, or go deeper into your topic by exploring other relevant questions.