Only have two exercises I am now stuck on. 5.3-11 and 5.3 14

Hello,

Would anyone be so kind to tell me how to go about 5.3-11 and 5.3-16. In my opinion, my 11 looks fines but the print statement may be off. I have print(calculate_diameter(user_input). Please help. I have gotten both questions wrong far too many times and I am beginning to step back.

Again, these are my last two exercises to complete the discovery course.

For 5.3-11, Iâ€™m not sure what you have wrong. Perhaps a missing parenthesis? The print statement should be: print(calculate_diameter(user_input))

For 5.3-16, you just need to assign the value 3.14 to pi, then put in a return statement with the formula for the area of a circle: pi * radius**2

Or if you meant 5.3-14 (as the title of the post states, then perhaps you are thinking that the diameter is 11, when it actually says the radius is 11? I did that at first, since the previous question gave us the diameter and I was trying to go quickly.

2 Likes

Hi, could you help me with 5.3-16, I stuck on it and this one is my last problemâ€¦

Pi=3.14
return area

but it says wrong(

You know you have to have a * between those variables to multiply them, right?

This one is weird. I know I did it right the first try where I tried multiplying radius times radius because I figured whatâ€™s the difference and I just didnâ€™t care. But you actually HAVE to use the exponent operator. I donâ€™t know how it even knows the difference.

That might be your only problem, I donâ€™t know. Iâ€™ll tell you I never made a variable for pi or area. I just wrote 3.14 right into the line where I needed it. And I just put all the math inside the return() so I didnâ€™t need an area variable.