Possible Duplicate:
Syntax error on print with Python 3
im trying to do factorial in python 3 and whatever I have put it tells me the same thing "Invalid syntax: syntax error"...Why is it giving me an error ? thanks
version is
Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:57:17) [MSC v.1600 64 bit (AMD64)] on win32
this is what im trying to do
>>> def fact(n):
... res = 1
... while n > 1:
... res *= n
... n -= 1
... return res
and when i try to print
>>> print fact(23)
it tells me SyntaxError: invalid syntax