# why isn't round function working on question number 3?

the round function worked well for questions 1&2. Why isn't it working on the question where we have to find the distance between two points?
Edit: I made a mistake, I meant to ask about number 2 instead of three. number three and one work fine. When I tried running my code on Thonny, it says TypeError: type complex doesn't define round method.

edited

Have you tried to convert input funtion into float number?
like

``````variable = float(input('words'))
``````

Because round() function will produce a float output as well.

Besides, the ways to make round() function works:

``````round(number or number variable, numberdigits)
``````

Following the 3rd question, it would be:

print round(hypotenuse,2)

or

print('A right triangle has hypotenuse', round(hypotenuse,2))

make sure your first argument is in parenthesis. so it should look like

``````round((equation for distance), number of decimals to round to)
``````

if that doesn't help, could you be more specific about whats going wrong with the function?

On q3, this happen might because you write the equation wrong or you didn't write the round() correctly

To round it to how many numbers after the decimal you want, you type

`round(_the number/answer from anywhere__,__how many decimals you want__)`

Positive means that that's how many decimal numbers to the right and negative means they round up digits, tenths, and hundred bases on how many you want to round up.

Hope this helps