The python: arithmetic operators

# Arithmetic operators 
A =. 9
B = 2

# operators: +, plus, the two objects refers to the sum, a + b output
Print ( '+ B = A', a + b)

# operator: - Save to give a negative number, or a number subtracted from another number, ab output
Print ( 'ab & =', ab)
Print ( 'B - = a', B - a)

# operators: *, by , multiply two numbers or return a string is repeated several times, a * b output
Print ( 'B = a *', a * b)

# operator: /, in addition, a means is divided by B, a / b output
Print ( 'a / b =', a / b)

# operator:% modulus, returns remainder of the division, b% a output
print ( 'b% a =' , b% a)

# operator: **, power, power return x to y, a ** b output
Print ( '** a = B', a ** b)

# operator: //, take divisible, taken down 's closest integer, a // b output
print ( 'a // b =' , a // b)

Guess you like

Origin www.cnblogs.com/Jessie-02/p/12669051.html