| 1 | initial version |
Second question: Depending on what you want, one of these should work.
sage: random()*2+1
2.6986168566690996
sage: randint(1,3)
1
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.