Last active
October 25, 2024 19:34
-
-
Save criskell/fe0653ef8ee8f2ee8c59fead75c04320 to your computer and use it in GitHub Desktop.
Exercício 73 - Curso em Vídeo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import time | |
| tabela = ('Botafogo', 'Palmeiras', 'Fortaleza', 'Flamengo', 'São Paulo', 'Internacional', 'Bahia', 'Cruzeiro', | |
| 'Atlético-MG', 'Vasco', 'Fluminense', 'Criciúma', 'Grêmio', 'Bragantino', 'Juventude', 'Vitória', | |
| 'Corinthians', 'Athletico-PR', 'Cuiabá', 'Atlético-GO') | |
| print('Welcome to the Brazilian championship table') | |
| print(''' Options menu | |
| To check the top 5 in the table, type { 1 } | |
| To check the last 4 placed press { 2 } | |
| To access the table in alphabetical order type { 3 } | |
| To see what position Chapecoense's team is in, type { 4 } | |
| To close type { 5 }''') | |
| while True: # Infinite loop | |
| n = int(input('Enter the desired option: ')) | |
| if n == 1: | |
| print(f'The top 5 teams are: {tabela[0:5]}') | |
| if n == 2: | |
| print(f'The last teams are: {tabela[16:21]}') | |
| if n == 3: | |
| print(f'{sorted(tabela)}') | |
| if n == 4: | |
| print('Series B, at 15º is Chapecoense') | |
| if n == 5: | |
| print('Closing Program...') | |
| time.sleep(1.5) | |
| break # End the loop | |
| print('Program Closed!') |
Author
criskell
commented
Oct 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment