5.3 (Step 11) help


#1

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.


Step 5.3 step 11
#2

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.


#3

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?


#4

What goes on the second to last line if not int before user_input?


#5

So, you are going to want to:

  1. establish the function
  2. define its parameters
  3. ask for its return
  4. ask for user input (and define what type of number works)
    and
  5. call the function, while printing its output

#6

I feel I am doing all of this, and getting no where.


#7

Anyone want to step in? I am afraid if I am too specific, it will just give the answers away.


#8

5.3 step 11 is that fill in the blank or the last problem befor going to 6


#9

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.


#10

That did it! Thank you! I would have never figured out that last line!
Thanks again!


#12

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.


#13

Thank you so much for your help!


#14

I’m stuck on this exact problem as well. Been working on it for so long…This feels so defeating…hahaha


#15

For me it was the last line that got me. There are two items that go on the print line.


#16

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?


#17

You can message me the code, if you want to.


#18

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.

Seana


#19

I admit, I am stumped. It looks just like what I entered. I would contact learn@launchcode.com.


#20

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.

Good luck!


#21

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?