Python for Beginners [6 of 44] Demo: Hello, World

Play Python for Beginners [6 of 44] Demo: Hello, World

The Discussion

  • User profile image

    I'm getting this message when I try to run the code, do you guys have the same problem?

    PS C:\Users\Diego\Desktop\intro to python> python
    python : The term 'python' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the
    spelling of the name, or if a path was included, verify that the path is correct and try again.
    At line:1 char:1
    + python
    + ~~~~~~
    + CategoryInfo : ObjectNotFound: (python:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

  • User profile image

    Hi Diego. Try 'py' or 'py -3' not 'python'

  • User profile image
    thank you @patrick
  • User profile image

    I get the following error on Win 10 and OS X:

    PS C:\Users\ffrei\Documents\apyth> python
    What's your name? Fritz
    Traceback (most recent call last):
    File "", line 1, in <module>
    name = input("What's your name?")
    File "<string>", line 1, in <module>
    NameError: name 'Fritz' is not defined

  • User profile image
    did you add the python folder to your PATH environmental variable?
  • User profile image
    Would I be able to add a constant and a variable in a single print statement?
    e.g. Print('hello' Name) //This errored out.
    Expected Output Hello Susan.
  • User profile image
    The internet is too slow here, so I will download it Pls.
  • User profile image

    I am getting the same error as Fritz

  • User profile image


    I found the cause for the NameError: I am using Python 2.7

    raw_input is the equivalent

    > python --version
    Python 2.7.10

  • User profile image
    Python 2 is at its end of life. Please upgrade to Python 3 as soon as possible (even right now we're at the lovely looking Python 3.8 already :))

    If you cannot run 'python' (without quotes of course) it means that python isn't in your PATH
  • User profile image
    In the newest version of VSC there is a run arrow in the top right hand corner which obviously runs the code you have open.

    My question is how do you suppress seeing the path of where the file and Python executable is located? Also why am I getting the % symbol? Below is an example.

    dev@MBP PyRelated % /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /Users/dev/Documents/PyRelated/
    [7, 21, 4, 5, 11, 5]
    [1, 4, 7, 1, 0]
    dev@MBP PyRelated %

  • User profile image
    I am not able to get the output with that statement (python Just nothing it just jumps to the next line again with the same command line (PS C:\Users\user\Desktop\Python>Can Someone please help me out with that?
    I did installed the extension and saved the file.
  • User profile image
    This is one of the worst python courses I've ever seen. She doesn't bother to explain anything, just runs with the stuff. Half the things she says don't work.

Add Your 2 Cents