Sololearn 4.1 Python for Beginners "Mathematical Operations
What is the result of the following operation? 7 % (5 // 2) 1 0 7
1
What is the output of this code? print(10 // 4) 2 3 0
2
What is the output of this code? print(8 ** (1 / 3)) 3.0 2.0 2
2.0
What is the output of this code? print(6**2) 36 12 66 64
36
What is the output of this code? print(6 // 1.5) 5.0 3.0 4.0 0
4.0
Write code to output 4 raised to the 5th power.
print(4 ** 5)
__ are used to raise a number to the power of another, which is called exponentation.
Two asterisks " ** "
If we want to find only the remainder in a division, we use the modulo operator
%
Select the operator that is used to determine the remainder of a division. ++ % // **
%
As we have seen, dividing two numbers always produces a float.In case we want to find the quantity produced by the division of two numbers as an integer (also called the quotient), we can use the floor division operator.
// "floor division operatot"