| 1 | initial version |
The difference is that in the for loop you use range so you get Python int objects, and when you type 10 you get a SageMath Integer (thanks to the preparser). For int objects in Python 2, / is floor division, so you get 10/4 == 2. Use srange if you want a range of SageMath Integers.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.