Solve computational problems using structured programming and apply…
Question Answered step-by-step Solve computational problems using structured programming and apply… Solve computational problems using structured programming and apply data structures in problem solving. 1. Given the following list: qtyPrice = [2, 1.5, 4, 0.5, 1, 2.5, 3, 2.0] Each pair of value in the list represents a quantity and unit price. For example, the first pair 2, 1.5 is 2 units at 1.5 per unit. Write a code segment using control structures to display the subtotal and total price as follows: 2 x 1.5 = 3.04 x 0.5 = 2.01 x 2.5 = 2.53 x 2.0 = 6.04 items.Total price $13.50 2. Given the following declaration,numList = [] Write a code segment that repeatedly prompts for integer values and inserts the value to numlist. Program ends when the length of numlist is 5. The value must be added in ascending order. Do not use any sort functions. Display the contents of the list after each input. A sample execution of the program is as follows: Enter num: 5[5]Enter num: 9[5, 9]Enter num: 5[5, 5, 9]Enter num: 2[2, 5, 5, 9]Enter num: 7[2, 5, 5, 7, 9] Computer Science Engineering & Technology Python Programming ICT 283 Share QuestionEmailCopy link Comments (0)


