5.3 Step 10 need a hint

Having trouble on 5.3 Step 10.

TODO: create a function called calculate_diameter that returns the diameter given a circumference

circumference = input(“Enter the circumference of a circle”)
calculate_diameter = 3.14/circumference
calculate_diameter = int(calculate_diameter)

TODO: get the circumference from the user

circumference = input(“Enter the circumference of a circle”)

TODO: call the calculate_diameter function with the user’s input and print its result

print(calculate_diameter)

Result:
Enter the circumference of a circle 22
Traceback (most recent call last):
File “python”, line 3, in
TypeError: unsupported operand type(s) for /: ‘float’ and ‘str’

Any direct as to how I can fix this would be much appreciated.

Your user input is a string. You can’t divide a float by a string.
Good Luck!

Sorry, I’m totally stuck! Thanks for the response.

circumference = input(“Enter the circumference of a circle”)
The user input above is a string, you must convert that string to a float before trying to use it in a calculation.

Below is a built in function you can use for that.
https://docs.python.org/3/library/functions.html#float

Good Luck!