Escolar Documentos
Profissional Documentos
Cultura Documentos
Calculadora Básica em Python
Calculadora Básica em Python
Elaborado por:
Rui Pires
LEE
"""
z=x+y
return z
z=x-y
return z
z=x*y
return z
if y == 0:
z=x/y
return z
def escolher_operacao ():
while True:
1. Adição
2. Subtração
3. Multiplicação
4. Divisão:\n"""))
return selecao
else:
return n1, n2
if menu_choice == 1:
elif menu_choice == 2:
elif menu_choice == 3:
return resultado
if continuar == "s":
main()
print ("Bye")
def main():
finished = False
result = 0
menu_choice = escolher_operacao()
n1, n2 = entrada_de_dados()
print ("===================")
break
terminar()
elif menu_choice == 2:
elif menu_choice == 3:
elif menu_choice == 4:
arquivo.write(n)
arquivo.close()
main()