Skip to content

Instantly share code, notes, and snippets.

View christiancost47's full-sized avatar

christiancost47

View GitHub Profile
@christiancost47
christiancost47 / test.py
Created August 21, 2019 16:29
Hello World
print("Hello world!")
@christiancost47
christiancost47 / Comments.py
Created August 22, 2019 16:05
Comments in Python
#Comentário de uma linha
'''
Comentário de multiplas linhas
Comentário de multiplas linhas
'''
@christiancost47
christiancost47 / hello.py
Created August 22, 2019 16:06
Printing stuff
print("Hello universe!")
@christiancost47
christiancost47 / variables.py
Last active August 22, 2019 16:34
Naming variables
#FAÇA
primeiro_tutorial, total_mensal, media_aluno1
#NÃO FAÇA
1Tutorial, tot@l_mens@al, media_em_%
@christiancost47
christiancost47 / cases.py
Created August 22, 2019 16:36
lowercase, title and uppercase
#O PYTHON INTERPRETA AS VARIÁVEIS ABAIXO COMO TOTALMENTE DIFERENTES
variable = 10 #lowercase(minuscula)
Variable = 20 #title(titulo)
VARIABLE = 30 #uppercase(maiuscula)
@christiancost47
christiancost47 / basic_operations.py
Last active August 22, 2019 17:36
basic_operations
soma = 2 + 2
>>> 4
subtracao = 10 - 5
>>> 5
multiplicacao = 5 * 5
>>> 25
divisão = 10 / 5
>>> 2
@christiancost47
christiancost47 / title.py
Last active August 22, 2019 17:38
title
name = "guido von"
print(name.title())
>>>Guido Von
@christiancost47
christiancost47 / more_operations.py
Last active August 22, 2019 17:39
more_operations
resto = 9 % 2 #resto de 9 dividido por 2
>>> 1
parte_inteira = 9//2 #parte inteira de 9 dividido por 2
>>> 4
potencia = 2**3 #2 elevado a terceira potencia
>>> 8
@christiancost47
christiancost47 / upper.py
Last active August 22, 2019 17:39
upper
name = "guido von"
print(name.upper())
>>>GUIDO VON
@christiancost47
christiancost47 / lower.py
Last active August 22, 2019 17:40
lower
name = "Guido Von"
print(name.lower())
>>>guido von