Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 2. (CLO1) (16 marks) Consider you have the following data for the customers: Customer name Amount Alya 1000 Noora 2500 Salwa 2000 Amna 3500
Question 2. (CLO1) (16 marks) Consider you have the following data for the customers: Customer name Amount Alya 1000 Noora 2500 Salwa 2000 Amna 3500 1. Write a function display which take a dictionary variable as input. The function should do the following:[8 marks) Display the total customers in the dictionary (as shown in the sample run) .Iterate through the dictionary elements and display the customer names and details as well as the amount of customers as shown in sample run. Calculate and display the total amount for all customer as shown in sample run. 2. Create a dictionary variable mycustomers containing the data given in above table. [4 marks] 3. Call the display function and pass mycustomers variable as argument to generate the required output as shown in the sample run. [4 marks) Sample run of the program: de fonction which tote a dictionary viable pet del display(dici): create an action with the data accanting to table of myCustors call the function display with appropiat orguments to achieve desired output display total customers: 4 Alya 1000 Noora 2500 Sale 2000 Anna 1500 Total amount : 9000 Paste you Answer Here Copy the code and past is het Take a screenshot of the code and the run of the program and paste it here
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started