I am unclear as to what to put in the return step. What needs to be looped back if not the diameter? I thought this was the point of the first three lines.
The return space is asking for a particular variable name-- the variable that the operations of the function define.
A clue is to look at the line where the function is established.
I may be more confused than I thought. Is there any way to know if I’ve gotten any of the lines right to narrow down where I’m going wrong?
What goes on the second to last line if not int before user_input?
So, you are going to want to:
- establish the function
- define its parameters
- ask for its return
- ask for user input (and define what type of number works)
- call the function, while printing its output
I feel I am doing all of this, and getting no where.
Anyone want to step in? I am afraid if I am too specific, it will just give the answers away.
5.3 step 11 is that fill in the blank or the last problem befor going to 6
Edit: Per our posting guidelines, large segments of code or solutions may not be posted. This post has been edited by an admin to remove violating content.
Hope this help you out.
That did it! Thank you! I would have never figured out that last line!
This one took me FOREVER to figure out. Everything you have looks right except for the user_input field. What goes there is something we’ve used a lot in previous exercises.
Thank you so much for your help!
I’m stuck on this exact problem as well. Been working on it for so long…This feels so defeating…hahaha
For me it was the last line that got me. There are two items that go on the print line.
I have my code working in repl.it but cannot get the fill in the blank to accept my answer. Can someone please help? I don’t want to post my code here, is there a PM function or something?
You can message me the code, if you want to.
Thank you Mystified13, I am also being really careful with what I’m typing into the test and still getting WRONG every time. This works perfectly on repl.it.
Edit: Removed code.
I appreciate you taking a look. By the way, I passed the follow up question that was very similar to this with no issues.
I admit, I am stumped. It looks just like what I entered. I would contact email@example.com.
The question asks
“Fill in the code below so that it gets the circumference of a circle from a user, uses a function to calculate and return the diameter, and then prints the diameter.”
The code challenge before this step tells you that the user input will be 22. This question does not give a user input. What if the user inputs a different number? Maybe try some different numbers and see if the code still works.
I am trying not to give the answer away, I am just floating some ideas around.
I use the following code in repl.it: When user input is 22 for circumference, my program returns 7.006369426751592 as the instructions state it should, but the fill-in-the blank will not accept my code.
It’s pristine…but question won’t accept. Suggestions?