• Advertisement
Sign in to follow this  

Getting an error while running this program

This topic is 661 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement
It seems the code was written for an older version of Python. Starting with Python 3.0, print changed from a statement to a function. See: What’s New In Python 3.0.

If you are learning Python, then you may consider downgrading to an older version of python.
If you need different versions of python installed side-by-side, then you may consider using a virtual environment. Edited by fastcall22

Share this post


Link to post
Share on other sites

Newer python "print( stuff )" requires parentheses around the stuff you want to print, but the syntax error is at the 'p' and not after it. This usually indicates a missing bracket or parenthesis at the line before.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement