logo

Crowdly

In Python 3, the / operator actually denotes division of floating point number...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

In Python 3, the / operator actually denotes division of floating point numbers, and Python automatically converts integers to floating point when needed. If you want to perform integer division (also called floor division) then you have to use the operator //.

Extend your program in expressions.py to compute and print out the values of the expressions above using // operator instead of /. Is the output what you expected? Floor division gives the largest integer that it smaller than the result of floating point division. Notice that this is not always the same as rounding to the nearest integer!

Enter your answers below

More questions like this

Want instant access to all verified answers on moodle.royalholloway.ac.uk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!