Complete the code to define the Hotel class with a name attribute.
class Hotel: def __init__(self, [1]): self.name = name
The constructor of the Hotel class should take the hotel name as a parameter and assign it to self.name.
Complete the code to add a method in Room class that returns the room number.
class Room: def __init__(self, number): self.number = number def get_[1](self): return self.number
The method should be named get_number to return the room number.
Fix the error in Booking class constructor to correctly assign the room and guest.
class Booking: def __init__(self, room, guest): self.room = [1] self.guest = guest
guest to self.room by mistake.The constructor should assign the parameter room to self.room. Using guest here is incorrect.
Fill both blanks to create a method in Hotel class that adds a Room object to its rooms list.
class Hotel: def __init__(self, name): self.name = name self.rooms = [] def add_room(self, [1]): self.rooms.[2](room)
rooms as parameter or add instead of append.The method parameter should be room and the list method to add an item is append.
Fill all three blanks to create a method in Booking class that checks if the booking is for a specific room number.
class Booking: def __init__(self, room, guest): self.room = room self.guest = guest def is_for_room(self, [1]): return self.room.[2] == [3]
The method parameter should be room_number. The room's attribute to check is number. Compare it to the room_number parameter.