Computer Studies‎ > ‎Python‎ > ‎Python Tutorial‎ > ‎

Division

The division operator in Python is a slash (“/”).

The following statement divides the number 13 by 4:

print (13 / 4)

Note that the result of this is a real number, or float, as it is called in programming. Compare this to the following example:

print (13 // 4)

...which produces a whole number, or int(eger).

Assignment

Write a program that prints the quotient of 5 divided by 6. Save as "010.py".
Comments