Thank you that is what I needed more detailed instructions on what I was looking at and trying to code.
look at the post by LaurenNicole and read what she wrote about 14 hours ago and read completely… two days later this is what made every thing click…
i changed it to user_input and it works on the previous page but i get an error when i put it as an answer. so i still not sure what i am missing. i may have to take a look at this again.
The directions say to print the diameter. The diameter will be an integer. The function calculate_diameter(circumference) will return the diameter as an integer using the circumference of a circle. The way to make the function give a return is to call it into being. The way to call a function is to say function_name(parameter).
In this example the parameter is the circumference. The circumference, or parameter, has been assigned to a variable.
Another way to read the line…
user_input = int(input(“What is the circumference of the circle?”))
…is to say it aloud in human words:
The variable user_input is equal to the circumference of a circle.
Hope this helps.
Thanks for the explanation and the help but it is still not clicking for me. I will try and see if i can figure it out tomorrow
No matter what I try the answer ends up being wrong, and I really do not know what else to do. I have solved all of the other problems. Will I not be able to attend the class if I do not solve this problem. I have been working on this for 3 days
Looking at your code posted above. It looks right except the print line. Is this what you are having trouble with?
Can you show us the rest of your code?
yes and i had changed my print line to print(calculate_diameter(user_input)) and it worked in replit but when i put it as an anwer it says it is wrong
diameter=circumference / pi
user_input =int(input("What is the circumference of the cirlce? "))
How are you typing it in your answer block?
Are you typing that whole thing in the answer? Its fill in the blank? They already have:
You only need to add what is missing?
im sorry i am not retyping print. thank you for assiting me and it still doesnt work.
it finally worked. thanks to everyone for assisting me with this
the 2 major things people are getting stuck on
the input can have decimals so you want to assign the correct type to it
the print statement needs to involve (user_input) in it
took me awhile myself so dont feel bad
NEVERMIND, I left the last parenthesis off on problem. When I added it, I got GOOD JOB.