Aug-20-2018, 06:55 AM
(This post was last modified: Aug-20-2018, 06:55 AM by HakolYahol.)
visual studio code gives an error on Mint
visual studio code gives an error on Mint
|
Aug-20-2018, 07:23 AM
next time please post code,
I have no problem with your code. word = input("enter a word: ") print("Here's each letter in your word:") for letter in word: print(letter)
Look down in left corner you are running with python 2.7.15.
λ py -2.7 Python 2.7.9 (default, Dec 10 2014, 12:24:55) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> word = input("Enter a word: ") Enter a word: loop Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<string>", line 1, in <module> NameError: name 'loop' is not defined # To fix it so it work Python 2 >>> word = raw_input("Enter a word: ") Enter a word: loop >>> word 'loop'You should be using Python 3.6 -->. Can click down in left and choose an other Python interpreter,it will show what Python interpreter it find on your system. I have a tutorial here VS Code from start
Aug-20-2018, 02:17 PM
in python 2 use
word = raw_input("enter a word: ")
Aug-21-2018, 09:58 AM
perfect
now i know how to further configure the program |
|
Users browsing this thread: 2 Guest(s)