Module 1 Lesson 4 syntax error when I cut and pasted

In Lesson 4, I literally and cut and pasted the code and received an error when ran it.

I pasted in the prompt:
Modify the code below to have it say hello to me.
print(“Hello, World!”)
My name is Keri

Error message:
Cell In [9], line 1
Modify the code below to have it say hello to me.
SyntaxError: invalid syntax

What’s the deal?

Did you modify the code?
Perhaps you are expected to add a print() statement to the second line?

1 Like

Hi @KKV,

I believe you are talking about this section of the notebook:


2. Hello, you!

Let’s create python code to say hello to you, instead of the world. Here are the steps to follow along with Andrew in the video:

  1. Open the chatbot

  2. Type in this prompt (substituting your name for mine)

         Modify the code below to have it say hello to me.
         
         print("Hello, World!")
         
         My name is Andrew
    
  3. Paste the output code in the cell below using Ctrl+V (Command+C on a Mac)

  4. Press Shift + Enter to submit your prompt


Please note, the instructions are asking you to first copy/paste the prompt into the chatbot, and then copy/paste the response from the chatbot back into the notebook (which would be python code)

Best,
Mubsi

1 Like