#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    Very new to python. could use help


    I am very new to python, so when I try this first thing this book told me to do I get a message saying "Invalid Syntax"

    This is what I typed.

    Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32
    Type "copyright", "credits" or "license()" for more information.
    >>> ('Hello, World!')

    I've also tried to type it as print ('Hello, World!')
    and I still get the message.
    and I tried saving it as new.py

    Does anyone have a clue what is wrong?
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    If you type:

    >>> print('Hello, World!')
    Hello, World!
    ^This should be your result..
    If you want it in a bracket then make it a tuple,

    >>> x = 'Hello'
    >>> y = 'World!'
    >>> x,y
    (Hello, World!)
    make sure you remember the quotations though

    Good Luck! I am new too
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0

    so confused


    I tried it ^ . still getting the message?

    Im so confused.
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    Can you attach a screen shot, then i will know exactly the problem because i tried it on visualizer and its not giving me a message
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    mediafire/view/?j4t3kn4vai7g340
    put .com after mediafire.

    devshed is giving me a message saying i cant post urls yet.
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    Okay if you look at the top then you can see how the top part is highlighted in red.. which means thats where your syntax error is...

    So instead of 3.3.0 it should be 3.2.. Because there is no version 3.3 out yet.
    Also, are you typing all of that on idle??

    if you are you dont need to
  12. #7
  13. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    thanx
  14. #8
  15. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    Originally Posted by hermandobbstaff
    thanx
    did it work??
  16. #9
  17. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    I still have to download the right version. I'll let u know if it works all good.
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    okay
  20. #11
  21. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    Ok so I just tried to different versions 2.7 and 3.2 and when I hit F5 the number 7 turned red and so did the 2.
  22. #12
  23. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2012
    Posts
    44
    Rep Power
    2
    http://www.python.org/getit/

    Go to this link and download the version that suits your computer best..

    this is how it should be:

    http://www.mediafire.com/?zr2h4i3nq5y4q6t
  24. #13
  25. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    Originally Posted by www.python.org
    Python 3.3.0 has been released.
    Published: Sat, 29 September 2012, 18:00 +0200
    Python prompts for input with three greater than signs followed by a space character. Put the cursor after that,
    press the enter button on your keyboard a few times,
    then type 'hi' and press enter.

    >>>
    >>>
    >>>
    >>> 'hi'
    'hi'
    >>>
    >>> 3
    3
    >>>
    [code]Code tags[/code] are essential for python code and Makefiles!
  26. #14
  27. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2012
    Posts
    7
    Rep Power
    0
    Still didnt work? Im about to give up. this sux
  28. #15
  29. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,841
    Rep Power
    480
    Your problem is bizarre. You're obviously experienced enough with your computer to use this forum.?!
    [code]Code tags[/code] are essential for python code and Makefiles!

IMN logo majestic logo threadwatch logo seochat tools logo