Challenge Convert Celsius to Fahrenheit has an issue.
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
My code:
function convertToF(celsius) {
var fahrenheit;
// Only change code below this line
fahrenheit = 9/5 * celsius + 32;
// Only change code above this line
return fahrenheit;
}
// Change the inputs below to test your code
convertToF(30);
This is the first appearance of functions and return values, as is noted at the end of the question. But for the novice - for which, up to this point everything is fine - nothing here makes sense.
This is a classic example of the information hiding conundrum of teaching programming: how to make things function, so as to teach/demonstrate something, without having introduced certain key concepts.
But at least a little intro to functions and return values should occur here. Even if it's just guidance to the order in which the lines occur, For example:
"_When the code runs, it starts with the call to convertToF(30) on line 12. The 30 is 'sent up' to the actual function, on line 2. So from that point on the variable _celsius_ is available to be used in the function (lines 2 to 9) with the value of 30._"
@johnrayworth thanks for the feedback. This challenge has gotten a lot of work done on it. We've tried to scope each challenge to just work on a single concept. This challenge being trying to combine all the mathematical operations you've learned so far. As the note says in the bottom, functions will be covered later on. I agree that hiding concepts isn't good, but I think of this challenge as a sneak peak of what is to come next.
cc/ @freeCodeCamp/moderators @HKuz what do you think?
Yes, we've received a lot of feedback on this challenge - it seemed very difficult, it was a steep learning curve where it was in the curriculum, and now as @johnrayworth points out, it uses concepts that haven't been taught. We moved it from the Basic JavaScript
section into Basic Algorithm Scripting
on the Beta site. It comes after the challenges introducing functions now, so I don't think we need to add any new language explaining a function in this one.
Unless others want to chime in, I think we can mark this as 'resolved on staging
' 馃槃
The question is ridiculous for absolute beginners. You people who make the questions are well aware of what to do, but someone like me isn't. So instead of learning I just have to go copy someone else answer and be done with it. good job.
I agree with @HKuz - this is resolved in staging, which will be pushed to production as soon as @BerkeleyTrue has finished the platform and UI enhancements.
I am new to JavaScript I don't understand this question it's badly written and actually making me want to use another coding site. I don't know the answer, the chat room isn't helping someone like me who is a first time coder. Everyone keeps telling me to write the code down with a pen and pencil, that would be fine if I had clearer instructions. I am also not an algebra person and everyone is telling me to learn basic algebra. None of which is actually helping me to solve the query.
Most helpful comment
The question is ridiculous for absolute beginners. You people who make the questions are well aware of what to do, but someone like me isn't. So instead of learning I just have to go copy someone else answer and be done with it. good job.