Sololearn 4.1 Python for Beginners "Mathematical Operations

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

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"


Set pelajaran terkait

AOA Foundations for Living Unit 3

View Set

Chapter 5 Human Development, quiz 5 6

View Set

Slide Studies (Cognitive Neuroscience)

View Set

inter mgnt 4.0 (meaning and dimensions of culture)

View Set

Venice italy - 8th wonders of the world

View Set

Chapter 5: PrepU - Infections sexually

View Set

System Administration and IT Infrastructure Services. Week 5: Data Recovery and Backups

View Set

Exam 3 N332: Wong Chapter 31, 23, 24, 25, 19

View Set