Computer Science, asked by anmollama713, 10 months ago

The guest_list function reads in a list of tuples with the name, age, and profession of each party guest, and prints the sentence "Guest is X years old and works as __." for each one. For example, guest_list(('Ken', 30, "Chef"), ("Pat", 35, 'Lawyer'), ('Amanda', 25, "Engineer")) should print out: Ken is 30 years old and works as Chef. Pat is 35 years old and works as Lawyer. Amanda is 25 years old and works as Engineer. Fill in the gaps in this function to do that.
def guest_list(guests):
for ___:
___
print(___.format(___))
guest_list([('Ken', 30, "Chef"), ("Pat", 35, 'Lawyer'), ('Amanda', 25, "Engineer")])
"""
Output should match:
Ken is 30 years old and works as Chef
Pat is 35 years old and works as Lawyer
Amanda is 25 years old and works as Engineer
"""

Answers

Answered by isahaktomy
3

Answer:

they were the only people in my family to be a good person to be with customers who are very happy

Answered by teresaugustine
1

Answer:

def guest_list(guests):

for x in guests:

 guests = enumerate(guests)

 print("{0} is {1} old and works as {2}.".format(x[0],x[1],x[2]))

guest_list([('Ken', 30, "Chef"), ("Pat", 35, 'Lawyer'), ('Amanda', 25, "Engineer")])

Explanation:

Similar questions