-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhello_world.py
More file actions
60 lines (46 loc) · 1.02 KB
/
hello_world.py
File metadata and controls
60 lines (46 loc) · 1.02 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# Comment
"""
multi-line
comment
"""
print("Hola Mundo!")
edad = 25
cantidad = 100
precio = 9.99
altura = 1.75
nombre = "Juan"
mensaje = 'Hola, Mundo!'
es_mayor_de_edad = True
tiene_descuento = False
es_estudiante = True
a = b = c = 10
# Si
Edad = 0
nombre_completo = "Omar"
total_ventas = 0
_contador = 10
# No
# 1edad # Number first
# nombre-completo # Dash instead of underscore
# If # Keyword
a = 10
b = 3
# Aritmetic Operators
suma = a + b # 13
resta = a - b # 7
multiplicacion = a * b #30
division = a / b # 3.333333333
division_entera = a // b # 3
modulo = a % b # 1
exponenciacion = a ** b # 1000
# Comparison Operators
igual = a == b # False
diferente = a != b # True
mayor_que = a > b # True
menor_que = a < b # False
mayor_o_igual = a >= b # True
meno_o_igual = a <= b # False
# Logic
resultado_and = (a > 5) and (b < 5) # True
resultado_or = (a > 15) or (b < 5) # True
resultado_not = not (a > 5) # False