Skip to content

Instantly share code, notes, and snippets.

@esthercamilo
Created June 25, 2018 15:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save esthercamilo/ec6d695c73157ee6892c9ca206856874 to your computer and use it in GitHub Desktop.
Save esthercamilo/ec6d695c73157ee6892c9ca206856874 to your computer and use it in GitHub Desktop.
exercicio 1
import time
def ligarChurrasqueira(Tfinal):
T = 0
print("Iniciando o aquecimento")
for i in range(0,Tfinal+1,10):
print('{0} graus'.format(i))
time.sleep(1)
if i > Tfinal:
print("Churrasqueira aquecida à {0}".format(Tfinal))
break
print("Aguardando 5 min...")
time.sleep(20) #coloquei só 20s, depois vc muda
print("Reduzindo a temperatura")
for i in range(Tfinal, 0, -10):
print('{0} graus'.format(i))
time.sleep(1)
ligarChurrasqueira(120)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment