I am completely stuck. I have not been able to complete the code correctly on either module and I need assistance.
I have tried all kinds of different options and am very lost.Here is one that I tried. I am able to get the “What is the circumference of the circle?” but then am not able to get the correct answer.
Hi, there are a couple of issues from your screenshot:
You’re not calling the function and passing it the user_input value. In line 6, you’re trying to print a variable that only exists within the function calculate_diameter(), you need to print the return value from calling the function with the user input.
You entered ‘22/3.14’ when it was expecting a number.
Also, from an efficiency standpoint: in line 4, you don’t need to do the calculation again that was just done and assigned to the variable diameter in line 3. You can just return the value of the variable diameter.
See the working example below: