Skip to content

Instantly share code, notes, and snippets.

View esthercamilo's full-sized avatar
🏠
Working from home

Esther Camilo esthercamilo

🏠
Working from home
View GitHub Profile
for p in ['Terra','Marte', 'Jupiter']:
print("Hello {0}".format(planeta))
@esthercamilo
esthercamilo / exerc.py
Created June 25, 2018 15:41
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))
@esthercamilo
esthercamilo / exerc2.py
Created June 26, 2018 21:13
Para colega
while True:
input1 = input("Você é uma pessoa organizada? (s/n)")
if input1 == 's':
print("Eu acho que você está mentindo")
elif input1 == 'n':
print("Você precisa aproveitar melhor seu tempo")
else:
print("Digite s ou n")
print("Vamos brincar com listas?")
frase=str(input("Digite uma frase qualquer"))
import socket
HOST, PORT = '', 8888
listen_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
listen_socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
listen_socket.bind((HOST, PORT))
listen_socket.listen(1)
print 'Serving HTTP on port %s ...' % PORT
while True:
import re
p = re.compile('\d')
m = p.match("amor123love")
print(m.group())
import re
p = re.compile('a')
m = p.match("amor")
print(m.group())
import re
p = re.compile('m')
m = re.findall(p,"ammor") #amor com 2 emes
print(m)
import re
p = re.compile('\d')
m = re.findall(p,"am2mor57")
print(m)
import re
p = re.compile('\(.+\)')
m = re.findall(p,"aldk(13432*76)adsjf")
print(m)