Categories
python programming

Python basic numerical operators

There are 4 basic operators with obvious signs. You can use () brackets as well.

There are two more operators.

‘// ‘ is division whose output is integer (fractions are truncated)

% gives remainder from an inter division.

Try following program. Change values of x and y and find out meaning of each operator.

x=361

y= 17

print (x+y, x-y, x*y,x/y,x//y,x%y,x**2,y**3)

write 10 complex arithmetic expressions and print results

Leave a Reply

Your email address will not be published. Required fields are marked *