-
Notifications
You must be signed in to change notification settings - Fork 5
/
ex3.py
46 lines (33 loc) · 963 Bytes
/
ex3.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
39
40
41
42
43
# Numbers
''' + plus
- minus
* multiply/ asterix
/ divide/ slash
< less than
> greater than
<= less than equal
>= greater than equal '''
print("i will now count my chickens: ")
print("Hens ", 25 + 30 / 6)
# this rerurns the decimal equivalent
# modulus
print(" Now I will count the eggs:")
print(3 + 2 + 1 - 5 + 4 % 2 - 1 / 4 + 6)
print("3+2 < 5-7")
#TEsting with the Numbers
#Lets see how these are executed and in which order !
#In the United States we use an acronym called PEMDAS which stands for
#Parentheses Exponents Multiplication Division Addition Subtraction.
#That's the order Python follows as well.
# Now checking the presence of mind of snake!
# We call it the snake fist in kung fu !
print("What is 3+2 ?", 3 + 2)
print("what is #3+2 ")
#You know them
#(abs)
print(abs(3 - 23))
print("lets do some maths in there : ")
print(3 + 2> 7 + 9)
print("is it true or false ? #")
print("is it true or false ? #3+2")
print("true or False #3+2")