On 2/24/11 12:49 AM, Santanu Sarkar wrote:

> In ' while ' or ' for ' loop in Sage, can one use ' { ' and ' } ' like C program?

No. In Python (the language you are using when you write Sage code) use indentation to indicate blocks of code.

for i in range(100):
    print i
    print i^2

See http://docs.python.org/tutorial/introduction.html?highlight=indentation#first-steps-towards-programming for a longer introduction.

Thanks,

Jason



--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URL: http://www.sagemath.org

Reply via email to