-
-
Save maluta/b5a7d4a74013fe29185a to your computer and use it in GitHub Desktop.
This file contains 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
# | |
perguntas = { | |
"a":"pergunta referente a opção a", | |
"b":"pergunta referente a opção b", | |
"c":"pergunta referente a opção c", | |
"d":"pergunta referente a opção d" | |
} | |
def funcionalidade_A(): | |
print("+-+") | |
print("|A|") | |
print("+-+") | |
def funcionalidade_B(): | |
print("+-+") | |
print("|B|") | |
print("+-+") | |
def funcionalidade_C(): | |
print("+-+") | |
print("|C|") | |
print("+-+") | |
def funcionalidade_D(): | |
print("+-+") | |
print("|D|") | |
print("+-+") | |
def menu(): | |
print("Menu:") | |
for opção in "abcd": | |
print(opção + " - " + perguntas[opção]) | |
def entrada_do_usuário(): | |
return input("Qual opção você deseja? ") | |
while True: | |
menu() | |
resposta = entrada_do_usuário() | |
if resposta == 'a': | |
funcionalidade_A() | |
elif resposta == 'b': | |
funcionalidade_B() | |
elif resposta == 'c': | |
funcionalidade_C() | |
elif resposta == 'd': | |
funcionalidade_D() | |
else: | |
print("Resposta inválida, saindo...") | |
quit() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment