Difference between revisions of "Product Command"
From GeoGebra Manual
m (capitalization) |
|||
Line 4: | Line 4: | ||
; Product[List of Numbers, Number of Elements]:Calculates the product of the first ''n'' list elements. | ; Product[List of Numbers, Number of Elements]:Calculates the product of the first ''n'' list elements. | ||
{{example|1=<code>Product[{1,2,3,4},3]</code> gives you the number 6.}} | {{example|1=<code>Product[{1,2,3,4},3]</code> gives you the number 6.}} | ||
+ | ==CAS Specific Syntax== | ||
+ | In [[CAS View]] only the following syntax is allowed: | ||
+ | ; Product[<List>]: Calculates the product of all elements in the list. | ||
+ | ; Product[<Expression>, <Variable>, <Start>, <End>]: Calculates the product of the expressions that are obtained by replacing the given variable with every integer from ''start'' to ''end''. | ||
+ | |||
+ | :{{Example|1= | ||
+ | :* <code>Product[{1,2,x}]</code> gives you ''6''. | ||
+ | :* <code>Product[x+1, x, 2, 3]</code> gives you ''12''.}} |
Revision as of 15:40, 29 July 2011
- Product[List of Numbers]
- Calculates the product of all numbers in the list.
- Product[List of Numbers, Number of Elements]
- Calculates the product of the first n list elements.
Example:
Product[{1,2,3,4},3]
gives you the number 6.CAS Specific Syntax
In CAS View only the following syntax is allowed:
- Product[<List>]
- Calculates the product of all elements in the list.
- Product[<Expression>, <Variable>, <Start>, <End>]
- Calculates the product of the expressions that are obtained by replacing the given variable with every integer from start to end.
- Example:
Product[{1,2,x}]
gives you 6.Product[x+1, x, 2, 3]
gives you 12.