subject

Does anyone know how to write this right? This is for a coding class and I’m super confused on it. First activity:

1. Declare three variables: firstSnack,
second Snack, and thirdSnack.
Assign the name of a snack (as a string)
to each variable.

2. Declare another variable and call it
bestSnack.
Assign a value to bestSnack USING THE
NAME OF ONE OF THE ABOVE VARIABLES.
Do not use a string directly.

3. Now, change your mind! Reassign the value
of bestSnack, again using the variable name,
not the string. (THIS SHOULD BE DONE ON
A NEW LINE)

Second activity:

4. Declare three variables and give them the names of three common grocery items. Assign to each variable a NUMBER value approximately its price. Don’t use $ sign, just the actual number.

5. Declare another variable, name it total, and assign to it the SUM of the three other variables, contain. Hint - you’ll need to use an arithmetic operator to do this.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 18:40
Adna sequence encoding a five-amino acid polypeptide is given below. …… …… locate the sequence encoding the five amino acids of the polypeptide, and identify the template and coding strand.
Answers: 1
question
Computers and Technology, 22.06.2019 09:00
Which best describes the condition under which the unicode output is the same as plain text?
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 22.06.2019 23:00
In which part of a professional email should you try to be brief, but highly descriptive?
Answers: 1
You know the right answer?
Does anyone know how to write this right? This is for a coding class and I’m super confused on it....
Questions
question
Social Studies, 22.08.2019 01:00
question
Social Studies, 22.08.2019 01:00
question
Mathematics, 22.08.2019 01:00
question
Physics, 22.08.2019 01:00
Questions on the website: 13722362