Module 5.3 - right answer/ wrong code

OK, I get the correct answer, but I’ve done something incorrect. I have tried changing everything and can not get the correct answer, unless I do it this way:

Instructor edit: Removed screenshot of code that was near the solution. If your code functions correctly but isn’t being accepted in 5.3 step 11, read Mystified13’s response below and see if that helps.


One thought that might help simplify things-- when you code for the “return”, you define the diameter mathematically. When you call the function, it should give you the return you coded for-- so-- do you need also to define diameter as a separate variable?

I also like to define variables (such as “pi”) before (or after) defining functions.