Skip to content

Commit bf64946

Browse files
committed
update variables.py file
1 parent c738d01 commit bf64946

6 files changed

Lines changed: 43 additions & 0 deletions

File tree

Comments.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
print("Hello!")
2+
# print("i will never run")
3+
print("End of program!")

Concatenation.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello " + "World")

HelloWorld.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
print("Hello World")

MathOperations.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Addition (Uses '+')
2+
print(1+2)
3+
4+
# Subtraction (Uses '-')
5+
print(2 - 1)
6+
7+
# Multiplication (Uses '*')
8+
print(3 * 2)
9+
10+
# Division (Uses '/')
11+
print(6/2)
12+
13+
# Integer Division (Uses '//')
14+
print(5//2)
15+
16+
# Modulus (remainder) (Uses '%')
17+
print(5 % 3)
18+
print(7 % 2)
19+
20+
# Exponents (repeated multiplication) (Uses '**')
21+
print(3**2)

NewLine.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
print("Hello\nWorld")
2+
3+
print("\n")
4+
5+
print("Hi\nHow\nare\nyou?")

Variables.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
x = 3
2+
print(x)
3+
4+
word = "elephant"
5+
print(word)
6+
7+
three = 3.0
8+
y = three * 2
9+
print(y)
10+
11+
x += 2 # Add 2 to x (Same thing as x = x + 2)
12+
print(x)

0 commit comments

Comments
 (0)