Assignment #1 1.2c: checking the candidate's answer

Greetings,

I am almost done with assignment #1 and I’m a bit stuck. 1.2c asks you to check to see if the candidate’s answer is correct. and then provide basic feedback as to whether or not the answer is correct. My code checks is error free through all previous parts, and here’s what I’ve done so far:

(1.1a and b): I defined the canidate name and asked them to enter it (let candidateName = input.question("Please enter your name: ");

(1.1c) I wrote a greeting: console.log("Hello " + candidateName + “!” + “\n”);

I defined the question (let question = Who was the first American woman in space? "), correct answer (let correct answer = “Sally Ride”)
and I defined the candidate Answer (let candidateAnswer = input.question("Who was the first American woman in space? ");

sooo–

  1. should I use a conditional to get the candidateAnswer? I tried but got an error message
    (candidateAnswer comes up as an unexpecrted identifier . Plus, I don’rt think we’re meant to use conditionals right now
  2. I’m trying to ask the computer to check and see if the candidate’s answer is the correct answer…any guidance would be appreciated :slight_smile:

Ok yall—I figured it out! You DEFINITELY need a conditional–and I needed to fix my structure :slight_smile:

1 Like

Thanks for flagging this! I’ve edited the assignment page to indicate that 1.2c is no longer a required piece of Assignment 1 Part 1.

Glad you figured it out though!