Post Reply 
The Role of the Graphing Calculator in 2021 and Beyond
04-13-2021, 02:58 PM (This post was last modified: 04-13-2021 03:11 PM by StephenG1CMZ.)
Post: #25
RE: The Role of the Graphing Calculator in 2021 and Beyond
(04-13-2021 09:08 AM)toml_12953 Wrote:  
(04-12-2021 10:27 PM)robve Wrote:  40 FOR J=0 TO 50: X=X+2*RND 2-3: NEXT J

What does RND 2-3 do? In standard BASICs, RND generates a random number in the range [0,1) but the 2-3 would be a syntax error.

If RND takes a single parameter I'd assume it would probably parse as
X +( 2*RND(2)) -3
On an interpreter where built-ins like RND do not need parentheses (pending verification on your selected interpreter)

But every basic is different so it needs checking.

It's IF POINT(X, Y) NEXT Y
that has my confused.

Whilst coding Python on a handheld isn't easy*, it is much easier than writing 3 different basic solutions, and trying to key those in on 3 different calculators each with their own idiosyncrasies.

*I have tried Pythonista on an IPhone (and Python-syntax-in-CAS on an emulated HP Prime)

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: The Role of the Graphing Calculator in 2021 and Beyond - StephenG1CMZ - 04-13-2021 02:58 PM



User(s) browsing this thread: 2 Guest(s)