Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
86 lines (70 loc) · 1.64 KB

File metadata and controls

86 lines (70 loc) · 1.64 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
# Assume variable a = 10 and variable b = 20
# Operator Description Example
# + Addition Adds values on either side of the operator. a + b = 30
# - Subtraction Subtracts right hand operand from left hand operand. a – b = -10
# * Multiplication Multiplies values on either side of the operator a * b = 200
# / Division Divides left hand operand by right hand operand b / a = 2
# % Modulus Divides left hand operand by right hand operand and returns remainder b % a = 0
# ** Exponent Performs exponential (power) calculation on operators a**b =10 to the power 20
# //Floor Division The division of operands where the result is the quotient in which the digits after the decimal point are removed.
#Number Format in Hex octa and Binary & Arithmetic Operator Example
a=0b100
print (a)
#Output is
#4
a=0xa
print (a)
#Output is
#10
a=0o100
print (a)
#Output is
#64
print ("Arithmetic Operator Example")
# Arithmetic Operator Example
a=10
b=20
#Addition Operator
print (a+b)
#Output is
#30
#Subscraction Operator
print (b-a)
#Output is
#10
#Division Operator
print (b/a)
#Output is
#2.0
#Multipication Operator
print (a*b)
#Output is
#200
#Power hsm_operation
c=2
d=2
print (c**d)
#Output is
#4
#Floor Division - The division of operands where the result is the quotient in which the digits after the decimal point are removed.
e=9
f=2
print (e//f)
#Output is
#4
#percentage Operation
print (e%f)
#Output is
#1
a=100
example = ---a
print (example)
a=100
example = --a
print (example)
a=100
example = +a
print (example)
a=100
example = ++a
print (example)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.