I want to do the following
var('n')
prod([k for k in range(1,n)])
But I get the following error: ValueError: cannot convert n to int
Is there some way to do this that does not involve writing a for loop?
| 1 | initial version |
I want to do the following
var('n')
prod([k for k in range(1,n)])
But I get the following error: ValueError: cannot convert n to int
Is there some way to do this that does not involve writing a for loop?
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.