Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Python image text in transcribed
image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Design Application Development And Administration

Authors: Mannino Michael

5th Edition

0983332401, 978-0983332404

More Books

Students also viewed these Databases questions