Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Shamkant B. Navathe

7th Edition Global Edition

1292097612, 978-1292097619

More Books

Students also viewed these Databases questions

Question

What is the cycle of intimate partner abuse?

Answered: 1 week ago