Jump to content

o que estou fazendo de errado?


Recommended Posts

Sorveteria: Uma sorveteria é um tipo específico de restaurante. Escreva uma classe chamada IceCreamStand que herde da classe Restaurant .

Adicione um atributo chamado flavors que armazene uma lista de sabores de sorvete. Escreva um método para mostrar esses sabores. Crie uma instância de IceCreamStand e chame esse método.

 

class Restaurant(object):    
    def __init__(self, restaurant_name, cuisine_type,num_cliente,lista_sabores): 
        self.restaurant_name = restaurant_name 
        self.cor = cuisine_type
        self.num_cliente = num_cliente+1
        self.flavors = lista_sabores
        
        
class IceCreamStand(Restaurant):    
    def get_sabores(self,lista_sabores):    
        IceCreamStand=self.flavors
        print(IceCreamStand)


sabores = Restaurant('Apolo 12','Cozinha Mexicana',7,['morango','chocolate'])

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Who's Online   0 Members, 0 Anonymous, 24 Guests (See full list)

    • There are no registered users currently online


×
×
  • Create New...