Question: Python Function: find airbnb Parameters: airbnb list (list of tuples), number of people (int), max price (float) Returns: A tuple Caitlin Yang (caitinyang@gatech edu) and
Function: find airbnb Parameters: airbnb list (list of tuples), number of people (int), max price (float) Returns: A tuple Caitlin Yang (caitinyang@gatech edu) and Jasmine Yap (iyap6@gatech.edu) Description: As a broke college student, you want to be able to stay in the best airbnb as possible but also stay in the airbnb that is affordable for you. You also want to be able to find an airbnb that will fit you and all your friends. Write a function called find_airbnb that takes in a list of airbnb tuples in the format (NAME, CAPACITY, RATING, PRICE_PER_NIGHT). The airbnb must be able to fit everyone in your party and be within your price range. If multiple apartments fit these requirements, return the one with the highest rating. No airbnbs with the same capacity will ever have the same rating. Return a tuple with the name of the airbnb (string) and the price that each person in your group will pay per night (float rounded to two decimal places) Also, if no airbnbs satisfy the conditions, then return an empty tuple. Note: If two airbnbs are both below the price range, then you should return the one with the highest rating
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
