1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Development Help for an absolute programming beginner (DONE)

Discussion in 'Software' started by fdbh96, 15 Jan 2012.

  1. fdbh96

    fdbh96 What's a Dremel?

    Joined:
    29 May 2011
    Posts:
    1,894
    Likes Received:
    33
    Well I decided today to find out a bit more about programming, and decided to start with python, as it is meant to be easy to learn, and free to develop.

    However, when writing my first program, print "Hello, World" it doesn't seem to work, and every site/book I've read doesn't explain how this might happen, as there really shouldn't be anything wrong with it. :wallbash:

    Here is what I have tried so far.

    Python 3.2.2 (default, Sep 4 2011, 09:51:08) [MSC v.1500 32 bit (Intel)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>> print "hello, world"
    SyntaxError: invalid syntax
    >>> print "hello, world
    SyntaxError: EOL while scanning string literal
    >>> print "hello, world"
    SyntaxError: invalid syntax
    >>> print "hello, world "
    SyntaxError: invalid syntax
    >>> print hello, world
    SyntaxError: invalid syntax
    >>> print "hello, world'
    SyntaxError: EOL while scanning string literal
    >>>

    Thanks for any help :thumb:


    EDIT: Found out why it wasn't working, it should be print ("hello, world!)
     
    Last edited: 15 Jan 2012
  2. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,953
    Likes Received:
    270
    Looking at examples, it shouldn't be this ?
    Code:
    print 'hello, world'
    Note: never programmed in python.
     
  3. fdbh96

    fdbh96 What's a Dremel?

    Joined:
    29 May 2011
    Posts:
    1,894
    Likes Received:
    33
    I have just downloaded Python 2.7.2 instead of 3.2 and it seems to work, any suggestions?

    EDIT: Found a solution
     
  4. fdbh96

    fdbh96 What's a Dremel?

    Joined:
    29 May 2011
    Posts:
    1,894
    Likes Received:
    33
    That doesn't work either :sigh:

    EDIT: found a solution
     
  5. faugusztin

    faugusztin I *am* the guy with two left hands

    Joined:
    11 Aug 2008
    Posts:
    6,953
    Likes Received:
    270
    Not sure what is problem in your case then :
    [​IMG]

    [​IMG]
     
  6. fdbh96

    fdbh96 What's a Dremel?

    Joined:
    29 May 2011
    Posts:
    1,894
    Likes Received:
    33
    In python 3, it changes to print ("Hello, World!")

    Thanks anyway :)
     

Share This Page