CAS commands
You can use Commands when working with the
CAS View. They are always followed by a set of parentheses (or brackets) containing the parameters necessary for the Command.
![](https://wiki.geogebra.org/uploads/thumb/4/47/Menu_view_cas.svg/16px-Menu_view_cas.svg.png)
Task
Find out if the number 12349 is a prime number. If not, display a list of its prime factors.
Instructions
1. | Use the command IsPrime(12349) to find out if the number is a prime number.
Hint:You will get either true or false as an answer. | |
2. | Use the command PrimeFactors(12349) to find all prime factors of this number. |
Try it yourself...
Automatic completion of commands
After typing in the first three letters of a Command into the CAS Input Bar, GeoGebra tries to complete the Command and shows you the required parameters within the brackets.
- If GeoGebra suggests the desired Command, press the Enter key to place the cursor within the brackets.
- If the suggested Command is not the one you wanted to enter, just keep typing until the suggestion matches.
Task
Find the greatest prime number smaller than 1000, as well as the smallest prime number greater than 1000.
Instructions
1. | PreviousPrime(1000)
| Use the command PreviousPrime(1000) to find the greatest prime number smaller than 1000. |
2. | NextPrime(1000) | Use NextPrime(1000) to calculate the smallest prime number greater than 1000. |