Skip to content

Commit 667c2ef

Browse files
update classes data types
1 parent 6b13ff1 commit 667c2ef

File tree

20 files changed

+29
-31
lines changed

20 files changed

+29
-31
lines changed

class-01-primitive-types/main.py

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
print("Oi, Python!") # string
2+
print(10+20) # number
3+
4+
# variable
5+
name = "Emanuel Quintino"
6+
age = 37
7+
8+
print(name)
9+
print(age)
10+
11+
print(type(name))
12+
print(type(age))
13+
14+
num1 = 7
15+
num2 = 2
16+
17+
print(num1 + num2)
18+
19+
print(2 + int("3"))
20+
print("A" + "B")
21+
print("C" + "23")
22+
23+
print("Eu sou " + name + " e tenho " + str(age) + " anos!")
24+
print(f"Eu sou {name} e tenho {age} anos!")
25+
26+
is_admin = False #boolean True or False
27+
28+
print(is_admin)
29+
print(type(is_admin))

class-01-data-types/main.py renamed to class-02-structural-types/main.py

-31
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,3 @@
1-
# Primitive Types
2-
3-
milk = "Leite Desnatado"
4-
volume = 2.5
5-
6-
print(type(milk))
7-
print(type(volume))
8-
9-
preparation1 = volume + 1
10-
preparation2 = milk + "10"
11-
12-
print(preparation1)
13-
print(preparation2)
14-
15-
life_cat = str(volume + 5)
16-
17-
print("O gato bebe " + milk)
18-
print("E tem " + life_cat + " vidas")
19-
20-
print("O gato bebe " + milk + " e tem " + life_cat + " vidas")
21-
print(f"O gato bebe {milk} e tem {life_cat} vidas")
22-
23-
name = "Emanuel"
24-
age = 31
25-
is_admin = False #boolean True or False
26-
27-
print(is_admin)
28-
print(type(is_admin))
29-
30-
# Structural Types (Collections)
31-
321
animes = ["Dragon Ball", "Naruto", "Jojo", "Death Note"]
332
# => 0 1 2 3
343
# <= -4 -3 -2 -1
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)