Page 1 of 1

Find Ticket Function Name: findTicket() Parameters: ticketDictionary (dict ) Returns: cheapest Ticket ( tuple ) Descript

Posted: Tue Jul 12, 2022 8:11 am
by answerhappygod
Find Ticket Function Name Findticket Parameters Ticketdictionary Dict Returns Cheapest Ticket Tuple Descript 1
Find Ticket Function Name Findticket Parameters Ticketdictionary Dict Returns Cheapest Ticket Tuple Descript 1 (105.47 KiB) Viewed 14 times
Find Ticket Function Name: findTicket() Parameters: ticketDictionary (dict ) Returns: cheapest Ticket ( tuple ) Description: You and your Georgia Tech friends decided to see the Winter Olympic Games in Beijing, China. You want to find the cheapest airplane ticket for your trip. Given a ticket dictionary with names of airlines (str) as keys and prices (int) as values, write a function that returns a tu- ple with the name and price of the cheapest available option. If the ticket dictionary does not have any airline-price pairs, you should return "No tickets available!" Note: No two flights will have the same ticket price, and no plane ticket price will exceed $10,000. >>> ticketDictionary = { "Air Canada": 722, "Alaska" 931, "jetBlue": 871 } >>> findTicket (ticket Dictionary) ('Air Canada', 722)