Skip to content

Commit e959b28

Browse files
committed
ajustes no display do menu
1 parent 718d04e commit e959b28

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

composite/menu.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ def description(self):
2828
def is_vegetarian(self):
2929
return all(sub_menu.is_vegetarian for sub_menu in self.menu_components)
3030

31-
3231
def display(self):
33-
print('\n' + self.name, ', ', self.description, sep='')
32+
print('\n' + self.name, end='')
33+
if self.is_vegetarian:
34+
print(' (v)', end='')
35+
print(', ', self.description, sep='')
3436
print('-' * 60);
3537
for menu_component in self.menu_components:
3638
menu_component.display()
@@ -63,6 +65,6 @@ def price(self):
6365
def display(self):
6466
print(' ' + self.name, end='')
6567
if self.is_vegetarian:
66-
print('(v)', end='')
68+
print(' (v)', end='')
6769
print(',', self.price)
6870
print(' --', self.description);

0 commit comments

Comments
 (0)