-
Notifications
You must be signed in to change notification settings - Fork 0
/
0_read.py
38 lines (33 loc) · 890 Bytes
/
0_read.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Repaso rapido variables y condiciones
# Presentacion
name = "Adrian"
age = 31
loves_running = True
running_km_per_hour = 11.6
height_in_meters = 1.6
loves_despacito_song = False
preferred_mexican_tv_channel = None
# Operaciones matematicas
current_year = 2017
meters_to_the_moon = 384400000000
print("Adrian nacio el año", 2017 - age)
print("Caben ", meters_to_the_moon / height_in_meters, "Adrianes de aquí a la luna")
# Condicionales sencillos
if loves_despacito_song:
print("No mas cervezas para Adrian")
else:
print("Adrian tiene un gusto decente en la musica")
# Condicionales
if age <= 18:
print("Adrian es un Generacion Z")
elif age <= 32:
print("Adrian es un Millenial")
else:
print("Adrian es un Generacion X")
# Ciclos
# print("La historia de Adrian: ")
# year = 1
#
# while year <= age:
# print("Adrian cumple ", year, "años")
# year += 1