course content

Course Content

Introduction to Python | Mobile-Friendly

ConvertingConverting

Suppose you want to change the type of a certain number. Use the eponymous function to convert a number into a float, int, or complex type. For example, if you convert a float number to an int, the decimal part will simply be removed.

Note that converting into an integer is not the same as rounding. The number from the example above, according to math, would be rounded to 5, but we got 4.


Task

Perform an integer division of 231 by 17 without using the // operator.

question-icon

Fill in the blanks to complete the task.

print(
_ _ _
_ _ _
_ _ _
_ _ _
_ _ _
_ _ _
)
13

Click or drag`n`drop items and fill in the blanks

dots
int
dots
)
dots
/
dots
17
dots
231
dots
(
down-icon

Section 2.

Chapter 8