Python for Beginners [10 of 44] Demo: Strings

Play Python for Beginners [10 of 44] Demo: Strings

The Discussion

  • User profile image
    Daniel

    Hello Christopher and Susan,

    Great course so far, however, I am having issues with the input function, and I can't find similar cases online to help fix it. I have been using Visual Studio Code for this course, but I have done a little bit of data analysis in python at uni using the Anaconda distribution and Spyder as IDE. The input doesn't work in visual studio code, but if I type the same code in Spyder it does work. It seems like a problem with Visual Studio, is it something you can help with?

    Error message:
    Please enter your first name: Daniel
    Traceback (most recent call last):
    File "strings.py", line 6, in <module>
    first_name = input("Please enter your first name: ")
    File "<string>", line 1, in <module>
    NameError: name 'Daniel' is not defined

  • User profile image
    gtaboy34
    @Daniel:
    post your code, it will help to see what is there *specially at line 6
  • User profile image
    Qboxer
    @Daniel:
    Have you been able to fix this?

    Mine is working perfectly as I am using Python 3.8.1.

Add Your 2 Cents

More episodes in this series

Related episodes