-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path80_restautante_9.1_.py
29 lines (23 loc) · 1.13 KB
/
80_restautante_9.1_.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
"""Crie uma classe chamada Restaurante. O método __init__() Restautante deve armazenar dois atributos:
restaurante_name e cuisine_type. Crie um método chamado describe_restaurante() que exiba essas duas informações em um método chamado open_restaurante() que exiba uma mensagem sinalizando que o restaurante
está aberto.
Crie uma instância chamada restaurant a partir da sua classe. Exiba os dois atributos individualmente e, em seguida, chame ambos os métodos.
"""
class Restaurant:
def __init__(self, restautant_name, cuisine_type):
self.restaurant_name = restautant_name
self.cuisine_type = cuisine_type
def describe_restaurante(self):
describe_msg = f'{self.restaurant_name} - {self.cuisine_type}. Uma comida apaixonante!'
print(describe_msg)
print('\n')
def open_restaurant(self):
mensagem ='Estamos abertos!'
print(mensagem)
restaurant = Restaurant('Kami Restaurant','Cozinha Oriental')
print(restaurant.restaurant_name)
print(restaurant.cuisine_type)
print('\n')
restaurant.describe_restaurante()
restaurant.open_restaurant()
print('\n')