Skip to content

Instantly share code, notes, and snippets.

@FranDepascuali
Created August 29, 2022 19:08
Show Gist options
  • Save FranDepascuali/7238d9097f200fc572c75de1ac97d3c1 to your computer and use it in GitHub Desktop.
Save FranDepascuali/7238d9097f200fc572c75de1ac97d3c1 to your computer and use it in GitHub Desktop.
Python santi
import wikiquotes
print("Hola Santi")
edad_santi = 30
edad_fran = 30
edad_santi_texto = "30"
edadSanti = 30
asdsadjasjdj = 30
print("Edad santi: ", edad_santi, " años")
if (edad_santi > edad_fran):
print("Santi es mayor que Fran")
print("Hola")
elif (edad_santi == edad_fran):
print("Santi y Fran tienen la misma edad")
else:
print("Fran es mayor que Santi")
# Indices: 0,1,2,3,4...
edades = [30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40]
print(edades[0])
edades_aula = {"santi": 30, "fran": 29}
print(edades_aula["santi"])
for edad in edades:
if (edad % 2 == 0):
print("Edad par: ", edad)
else:
print("Edad impar: ", edad)
def suma(a, b):
return a + b
print(suma(1, 2))
# j = suma(1, 2)
# print(j)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment