Skip to content

Commit 6b92015

Browse files
committed
Added a main() function.
1 parent e844a55 commit 6b92015

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

3-tier.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ def get_product_information(self, product):
4444
print('That product "{0}" does not exist in the records'.format(product))
4545

4646

47-
if __name__ == '__main__':
48-
47+
def main():
4948
ui = Ui()
5049
ui.get_product_list()
5150
ui.get_product_information('cheese')
5251
ui.get_product_information('eggs')
5352
ui.get_product_information('milk')
5453
ui.get_product_information('arepas')
54+
55+
if __name__ == '__main__':
56+
main()

0 commit comments

Comments
 (0)