Are these lessons or guessing games?

Tell us what’s happening:

I looked at the answer to solve this problem and, let’s be fair, how else was I going to get it? You have shown me a tiny part of what was going on with this test. I’ve never seen this “(celsius * (9/5)) + 32” before. Was I supposed to get the answer using my celebrated psychic powers, and let’s face it, your wonderfully insightful hint of “It’s something you’ve never seen before” wasn’t a big help. I want to learn how to code more than you could ever know and I have searched the internet looking for a way to accomplish this. I think you ought to have a rethink on your teaching techniques because some of these lessons are more like guessing games.

Before I looked at the answer my code was (ZILCH, NADA, NOTHING, I had no idea where to start.)

function convertToF(celsius) {
  // Only change code below this line
  var fahrenheit = (celsius * (9/5)) + 32;
  // Only change code above this line
  return fahrenheit;

// Change the inputs below to test your code

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:58.0) Gecko/20100101 Firefox/58.0.

Link to the challenge:

Hi there, don’t get discouraged! On the left side of the page the tutorial says that:

The algorithm to convert from Celsius to Fahrenheit is the temperature in Celsius times 9/5, plus 32.

The initial temperature is in °C and is represented by the variable celsius. You then need to multiply this variable by 9/5 and then add 32. Therefore (celsius * (9/5)) + 32 is the code that’s needed to get the °F temperature represented by the variable fahrenheit.

Also, perhaps there are a bit more parentheses than necessary and that’s a bit overkill. You could have just written celsius * 9 / 5 + 32.

As @sgoldber61 pointed out, the challenge tells you the algorithm so you do not need physic powers. You just have to read all the information the challenge gives you and apply what you have learned by writing code to calculate the value of Fahrenheit based on a given value of Celsius.

Thank you sgoldber61, I did have a bit of a melt down with that one. I appreciate you explaining it for me and it was actually the paretheses in the answer that got me to my boiling point as I had never seen them placed that way before then. With that explained the answer is pretty much injected into the question. I do wish that freeCodeCamp would explain these things. Cheers.

Thank you randelldawson, As I said to sgoldber61 it was the parentheses that got me a little annoyed. I don’t know how long you have been coding but I am very inexperienced and have only been learning for a very short time. In my opinion the explanations could be more detailed given the fact that this is a tutorial. Thanks again for your feedback.

Scot, if you don’t mind me asking, what’s your math level?

Do you have a competency in math at the level of Algebra 1? While web programming (i.e. what FreeCodeCamp teaches) is not as mathematically intensive as other branches of computer science, you should still have a foundation in math at the level of Algebra 1, and preferably at the level of Geometry + Algebra 2.

I say this because if you had a solid grasp of basic algebra, the parentheses would not have thrown you off in the slightest. It is your responsibility to figure out the basic math required in computer programming. Do you have the opportunity where you live to brush up on your math skills, maybe take a community college class? Because if you are not able to, then some of the larger FreeCodeCamp projects down the road will be impossible to figure out.

1 Like

Hi sgoldber61, I think you just hit the nail on the head. My mathematics skills are terrible as I didn’t even complete my second year of high school. I don’t quite know what to do now as I don’t know any algebra or geometry. Is this course going to be impossible for me or do you think I might be able to muddle through?

It is possible to learn algebra. I’m not going to lie, if you didn’t go to highschool it will be hard, you’ll want to quit, punch your computer down, throw your books trough the windows and look to your screen for hours trying to figure out what’s crong with your code before realising you forgot a minus before a variable. But algebra is mandatory if you want to do web developement (or any developing work as far as I know)

But keep in mind that as long as you don’t give up, you’ll keep improving.

When I was studying in college, I was earning pocket money by teaching maths to highschool sutendts. It was a while back but if you need a hand, I’d be happy to help you.

It’s definitely not impossible. The amount of algebra that I’ve had to use in professional web development is less than I had to use working in retail. There are some concepts that involve a lot of algebra, but there’s very little in the way of math in the programming that we do here. I think that if you continue, you’ll not only be able to get through the program here but also end up learning some of those algebra skills that you missed.

As with anything else, if you enjoy doing something then you can’t let anyone stop you from doing it. You can always ask questions here or in the chat room, but maaaaaaayyyybe leave out the snark about psychic powers next time?

If you want a great internet platform to learn math with, check out KhanAcademy. Years ago I was struggling with math in college. I started here at the 2nd grade level and worked my way up to calculus. I don’t like the way some of the higher level content is taught, but overall it’s great.

Thank you for your response hadrienallemon I really appreciate your words of encouragement. I have been looking into learning algebra online and I have found that there is quite a lot of help out there. I’ll see how I go with some lessons and I’m hoping that will help. I won’t give up as I am very determined to learn how to code. I may at some point take you up on your offer of help, I certainly need it. Thanks again.
P.S I’m already staring at the screen and wondering “What the hell is wrong here!”

Thank you PortableStick for your encouragement. I do apologise to everyone out there for my feeble attempt at sarcasm with my snarky comment about “my celebrated psychic powers”. I can be a bit of a knob sometimes when I get frustrated, I always regret it afterwards but I can’t seem to help it when I’m in that state. I’ll try my best to curb it. I will check out the link you sent me for KhanAcademy. To be honest I would love to learn and have an understanding of calculus though I doubt it will ever happen. I will start with the algebra and see how I go. Thanks again for your advice.