हिंदी

Write a function to add any customer's information to queue.

Advertisements
Advertisements

प्रश्न

Write a function to add any customer's information to queue.

कोड लेखन
Advertisements

उत्तर

customer_queue = []


def add_customer(name, customer_id, amount):
    customer = {
        "name": name,
        "customer_id": customer_id,
        "amount": amount,
    }
    customer_queue.append(customer)  # Add customer at the rear
    print("Customer information added")


add_customer("Arun", 501, 2500)
shaalaa.com
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 6: Stacks & Queues in list - EXERCISE [पृष्ठ १२३]

APPEARS IN

सीबीएसई Computer Science with Python [English] Class 12
अध्याय 6 Stacks & Queues in list
EXERCISE | Q 25. | पृष्ठ १२३
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×