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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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 13 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)
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply