Difference between revisions of "IsPrime Command"

From GeoGebra Manual
Jump to: navigation, search
(command syntax: changed [ ] into ( ))
 
(8 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.0}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude>
{{command|CAS}}
+
{{command|algebra}}
;IsPrime[ <Number> ]
+
;IsPrime( <Number> )
:Returns ''true'' or ''false'' depending on whether the number is prime or not.
+
:Gives ''true'' or ''false'' depending on whether the number is prime or not.
 
:{{example| 1=<div>
 
:{{example| 1=<div>
:* <code><nowiki>IsPrime[10]</nowiki></code> yields ''false'',
+
:* <code><nowiki>IsPrime(10)</nowiki></code> yields ''false'',
:* <code><nowiki>IsPrime[11]</nowiki></code> yields ''true''.
+
:* <code><nowiki>IsPrime(11)</nowiki></code> yields ''true''.</div>}}
</div>}}
+
==CAS Syntax==
 +
;IsPrime( <Number> )
 +
:Gives ''true'' or ''false'' depending on whether the number is prime or not.
 +
:{{example| 1=<div>
 +
:* <code><nowiki>IsPrime(10)</nowiki></code> yields ''false'',
 +
:* <code><nowiki>IsPrime(11)</nowiki></code> yields ''true''.</div>}}

Latest revision as of 12:53, 5 October 2017


IsPrime( <Number> )
Gives true or false depending on whether the number is prime or not.
Example:
  • IsPrime(10) yields false,
  • IsPrime(11) yields true.

CAS Syntax

IsPrime( <Number> )
Gives true or false depending on whether the number is prime or not.
Example:
  • IsPrime(10) yields false,
  • IsPrime(11) yields true.
© 2021 International GeoGebra Institute