Introduction to Programming using Python 1st Edition

Published by Pearson
ISBN 10: 0132747189
ISBN 13: 978-0-13274-718-9

Chapter 2 - Elementary Programming - Section 2.8 - Numeric Data Types and Operators - Check Point - MyProgrammingLab - Page 42: 2.11

Answer

8.4 8 2 0 1 0 59 48 25 26.009999999999998

Work Step by Step

Placing each of these expressions into a Python Interpreter will result in those answers. 1) Using division with two integers will result in a float. 2) Using integer division with two integers will result in an integer, that is the greatest integer value less than the result of division between the same integer inputs. 3) Using modulus with two integers will result in an integer equal to the remainder of the division using the same input integers. 4) When using modulus, if the second inputted integer divides the first without remainder, the result is 0. 5) When using modulus, if the second inputted integer is greater than the first, then the result is the first inputted integer. 6) see #4 7) Operator Precedence in Python means the interpreter will execute multiplication in a statement before addition or subtraction. 8) Operator Precedence means the statement within the parenthesis will execute first. Multiplication and modulus have equal precedence, so the statement is executed left to right. The addition at the beginning of the statement has the least precedence so it will be executed last. 9) Using exponentiation with two integers will result in an integer. 10) Using exponentiation with a float and an integer inputted together will result in a float.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.