Stuck on 1st quiz. this is an awful experience

https://www.codecademy.com/paths/code-foundations/tracks/learn-how-to-code/modules/bop-i/quizzes/bop-variables-quiz

1st question, 1st quiz, the answer hasnt been covered in the lessons. should i just start guessing and use trial and error to pass the quiz? what is this? whats going on? im being quizzed with questions not covered… all the info iv had is… type my name in the box, change a colour value, type grass,rock and tree into a box… and now im being quizzed on variables… really what is this all about? iv 6 days left before im going to get charged £200+ pounds for this… really? and theres no one around to help? im sat here wasting time…

Hello @stu, welcome to the forums! Could you post a screen shot of the question you’re stuck on, as the quiz questions are randomly generated.

sure how do i take a screen shot plz

If you open a program on your PC called “snipping tool” then you can use that to take a snapshot and copy and paste it into the reply box here!

i found window key + print screen has worked cheers.

The previous lesson was covering the topic of variables, so based on your knowledge from that lesson you should be able to work it out. What it’s essentially asking you is what is the value that is being assigned to numSides in the final step of the code there?

thats just not true buddy. iv got no idea what this is or how to work it out. honestly all iv been shown/ had to do is type “grass” into a box a few times

its multiple choice so i can guess but thats not learning. iv not been told if i should add minus, times. or whatever?

i dont want to guess. i want to know what i have to do to work this out. and thats not been covered at all

You don’t need to do any operations. The steps taken in the question are

  1. initialise numSides
  2. set numSides to have the value 4
  3. set triangle to have the value 3
  4. set numSides to have the value of the variable triangle

This is all the information you need to work it out. The lesson covered assigning a value to a variable, which is shown in the Reusing Values in Variables lesson with my_number = 847595593392818109495. This code is doing the same thing, however the value being assigned to numSides in the last line is the variable triangle. Hopefully that helps!

1 Like

i feel very sad, maybe this isnt for me… i really do not understand what i have to do.

It just takes time, coding requires a different way of thinking, and if you can push through the initial barrier then you will find it really rewarding! I’ll give you the answer to this question if you would like, and then for next time you should hopefully know what you need to do.

im reading that page over and over and im not seeing it. its just change the long number to my_name.

numside is 4. triangle is 3 so it adds up to 7? as a final value?

Not quite, there’s no operations going on in the question. If things are being summed then the + operator would be in the code. What’s happening is you are assigning a different value to numSides. numSides is initialised with no value, and then is assigned a value of 4 using the assign operator =. So when you have numSides = triangle, you are assigning the value of triangle to the value of numSides, and overwriting the current value. Therefore numSides = 3, as triangle = 3 and numSides = triangle.

thank you very much for explaining that. i couldn’t see anything like that in the info before. 2 hours now on this question.

1 Like

No worries, coding is a challenge getting started but it’s one of these things that each language gets progressively easier the more you learn as your brain is in that way of thinking! Stick with it and hopefully all will go well.

1 Like

one more quick question. im being asked to copy and paste code from one part of the script to another… how do i do that? when i highlight the text and right click im not getting the option to copy or paste. ctrl+c or p isnt working either.

Hmm that’s odd, both of those should be working. Sounds like it could be either a browser issue or a webpage issue honestly, if those aren’t working I don’t think that’s something I can help with.

1 Like

fyi, CTRL + P is to print. If you want to paste it’s CTRL + V

2 Likes