-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlesson104.py
More file actions
101 lines (53 loc) · 1.88 KB
/
lesson104.py
File metadata and controls
101 lines (53 loc) · 1.88 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
# remember that # makes comments so depending if you are using and IDE or KATE or VSCODE lines with # are gonna be ignored
# on this lesson we are going to learn how to do math
# we are going to do this with variables like a
a = 158
b = 200
# Now we got the variables ready
print(a + b)
# Reminder that putting a quote just puts it as text
# Now we have the othe option, which is using ANOTHER variable
# I will use c as a example of this lesson
# With different numbers
a = 293
b = 395
c = a + b
# Now we can print c
print(c)
# Both give the same result from the previous print if we used the same numbers
# Now, let's do divisions
# I will use the same variables but with different numbers
a = 1000
b = 500
c = a / b
# Now we can print c
print(c)
# This will give us 2.0 because it is a float division
# If we want to do a integer division we can use //
c = a // b
# Now we can print c
print(c)
# This will give us 2 because it is a integer division
# Now let's do a multiplication
a = 10
b = 5
c = a * b
# Now we can print c
print(c)
# This will give us 50 because it is a multiplication
# And for minus is the same as the first one but with a minus instead of a plus
a = 103
b = 506
c = a - b
# Now we can print c
print(c)
# This will give us -403 because it is a subtraction
# And that would be all for this lesson
# Remember that you can use any variable name you want, but it is recommended to use a meaningful name
# Also remember that you can use any number you want, but it is recommended to use numbers that are easy to remember
# And that is all for this lesson, I hope you enjoyed it and learned something new
# If you have any questions, feel free to ask me
# See you in the next lesson!
# No copilot for VSCODE, i don't want to make a modulo, let's keep it simple
# do you understand, copilot?
# I hope you do, because this is a simple lesson not math 55 Hardvard