Re: Python Print Error

2016-07-28 Thread Stephane Wirtel
In fact, the issue is well defined, "Missing parentheses in call to 'print'", in this case, you have to add the parentheses when you call 'print'. print("In Python3, you must to add the parentheses") On 07/28, Cai Gengyang wrote: How to debug this ? print "This line will be printed." Sy

Re: Python Print Error

2016-07-28 Thread Timothy
On Thu, 28 Jul 2016 10:40:28 -0700, Cai Gengyang wrote: > How to debug this ? > print "This line will be printed." > SyntaxError: Missing parentheses in call to 'print' You are probably using Python 3, while the syntax is for Python 2. Use print("This line will be printed.") instead. -- htt

Re: Python Print Error

2016-07-28 Thread Ian Kelly
On Thu, Jul 28, 2016 at 11:40 AM, Cai Gengyang wrote: > How to debug this ? > print "This line will be printed." This is Python 2 print statement syntax. > SyntaxError: Missing parentheses in call to 'print' This indicates that you're trying to run the above in Python 3. -- https://mail.p

Re: Python Print Error

2016-07-28 Thread Joel Goldstick
On Thu, Jul 28, 2016 at 1:40 PM, Cai Gengyang wrote: > How to debug this ? > print "This line will be printed." > SyntaxError: Missing parentheses in call to 'print' > -- > https://mail.python.org/mailman/listinfo/python-list You are using python 3.x. print is a function. Use print("this l

Python Print Error

2016-07-28 Thread Cai Gengyang
How to debug this ? >>> print "This line will be printed." SyntaxError: Missing parentheses in call to 'print' -- https://mail.python.org/mailman/listinfo/python-list

Re: Python Print Error

2016-07-27 Thread Steven D'Aprano
On Wednesday 27 July 2016 13:45, Cai Gengyang wrote: > How to debug this error message ? Start by reading the message: invalid literal for int() with base 10: '' Now try to experiment at the interactive interpreter: int('45') # works int('xyz') # ValueError: invalid literal for int() with ba

Re: Python Print Error

2016-07-26 Thread Frank Millman
"Cai Gengyang" wrote in message news:c704cb09-ce62-4d83-ba72-c02583580...@googlegroups.com... How to debug this error message ? print('You will be ' + str(int(myAge) + 1) + ' in a year.') Traceback (most recent call last): File "", line 1, in print('You will be ' + str(int(myAge) + 1

Re: Python Print Error

2016-07-26 Thread Jussi Piitulainen
Cai Gengyang writes: > How to debug this error message ? > > print('You will be ' + str(int(myAge) + 1) + ' in a year.') > Traceback (most recent call last): > File "", line 1, in > print('You will be ' + str(int(myAge) + 1) + ' in a year.') > ValueError: invalid literal for int() with base

Python Print Error

2016-07-26 Thread Cai Gengyang
How to debug this error message ? print('You will be ' + str(int(myAge) + 1) + ' in a year.') Traceback (most recent call last): File "", line 1, in print('You will be ' + str(int(myAge) + 1) + ' in a year.') ValueError: invalid literal for int() with base 10: '' -- https://mail.python.org