IDEA: SCRIPTS ON HP-PRIME
01-15-2017, 01:59 AM (This post was last modified: 02-15-2017 02:51 AM by compsystems.)
Post: #1
 compsystems Senior Member Posts: 1,329 Joined: Dec 2013
IDEA: SCRIPTS ON HP-PRIME
Hello

The scripts (sequence of commands) allow us to show the procedure of math operations without having to create a program.

The idea is to implement it experimentally only in the simulator (in a beginning),

The simulator would have a menu.
Script
/Run (on CAS history)

What do you think of this idea?

File Script1.hppscr

PHP Code:
//simplify(none);(2*x^2-3*x+4) > (3*x^2-2*x-2);Ans + -2*x^2; simplify(Ans);Ans + 3*x; simplify(Ans); Ans + -4;simplify(Ans);

run Script1.hppscr
Is executed, sentence by sentence stopping in each one, with the key [enter] or by a menu [continue] [pause]

PHP Code:
(2*x^2-3*x+4) > (3*x^2-2*x-2)(2*x^2-3*x+4-2*x^2) > (3*x^2-2*x-2-2*x^2)(-3*x+4) > (x^2-2*x-2)(-3*x+4+3*x) > (x^2-2*x-2+3*x)4 > (x^2+x-2)0 > (x^2+x-2-4)0 > (x^2+x-6)

The script within a program gets complicated. Also the print view does not have pretty-print, while the history does have it.

PHP Code:
#cas  script1():=  begin   local expr0;   print;   print("step1:");   expr0 := (2*x^2-3*x+4) > (3*x^2-2*x-2);   print(string(expr0));    print("");   print("step2: +(-2*x^2)");   expr0 := expr0 + -2*x^2; // (3*x^2-2*x-2-2*x^2)<(2*x^2-3*x+4-2*x^2)   print(string(expr0));    expr0 := simplify(expr0);  // (-3*x+4)>(x^2-2*x-2) simplification.     print("simplify → " +expr0);   print("");   print("step3: +(3*x)");   expr0 := expr0 + 3*x; // (-3*x+4+3*x)>(x^2-2*x-2+3*x)   print(string(expr0));    expr0 := simplify(expr0); // 4>(x^2+x-2)     print("simplify → "+expr0);   print("");   print("step4: +(-4)");   expr0 := expr0 + -4; // 0>(x^2+x-2-4)   print(string(expr0));    expr0 := simplify(expr0);      print("simplify → "+expr0); // -> 0>(x^2+x-6)   print("");     return expr0;     end;#~end

02-01-2017, 11:46 PM
Post: #2
 compsystems Senior Member Posts: 1,329 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
The famous ti68k calcs (Unfortunately discontinued), were a product designed for the educational environment, had the option of creating scripts, you can see that at the beginning of the next code before the colon there is a character of commands, which simplify the coding

P: print the result of the statement
C: Execute the current statement
Empty: does not execute anything

PHP Code:
:DelVar ec1, ec2C:NewProbC:ClrHome :Local ec1, ec2 :{0,0}soly :©// "Find the dimensions of a rectangle whose area is 45 and its perimeter 28" :©// "METHOD 1 (Algebraic solution, stepwise)" :©// "The equations are:"C:x*y=45ec1C:2x+2y=28ec2C:factor(ec2) :©// 2*(x+y) = 28C:ans(1)/2C:solve(ans(1),y) :©// y=14-xC:ec1|(ans(1)) :©// x*(-x+14)=45C:expand(ans(1)) :©// -x^2+14*x = 45C:solve(ans(1),x) :©// x=5 or x=9C:explist(ans(1),x)solx :©//{ 5, 9 }C:ec1|x=solx[1] :©// 5*y=45C:solve(ans(1),y) :©// y=9C:explist(ans(1),y)[1]soly[1] :©// { 9 } :©// testC:ec1|x=solx[1] and y=soly[1] :ec2|x=solx[1] and y=soly[1]:C:ec1|x=solx[2] :©// 9*y=45C:solve(ans(1),y) :©// y=5C:explist(ans(1),y)[1]soly[2] :©// { 5 } :©// testC:ec1|x=solx[2] and y=soly[2] :ec2|x=solx[2] and y=soly[2] :©solutions: x=5 & y=9 or x=9 & y=5 :C:©//"METODO2 (Solucion algebraica directa)"C:solve(ec1 and ec2,{x,y}) :C:©METODO3 (Solucion grafica)C:©//"Despejar y en ambas ecuaciones,graficar las 2 curvas y hallar los puntos de corte."C:setmode("graph","function")C:setgraph("axes","on")C:0xmin:20xmaxC:0ymin:10ymaxC:solve(ec1,y)C:expr("define y1(x)="&string(right(ans(1))))C:solve(ec2,y)C:expr("define y2(x)="&string(right(ans(1))))C:traceC:delvar ec1,ec2,sol

02-06-2017, 03:16 PM (This post was last modified: 02-12-2017 01:15 PM by compsystems.)
Post: #3
 compsystems Senior Member Posts: 1,329 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
I am writing a guide, of sample scripts on ti68k calculators, I hope the hp-prime development group will consider this and incorporate this functionality in the near future (as INSPIRATION NOT CLONING) Inspiration because the SCRIPTS of the ti68k ARE VERY LIMITED, I want to see something more powerful in the HP-PRIME

PDF scripts Guide

TI68K binary files

SCRIPT #01

Solve the following system of two equations and check their solutions.
{y=x^2), y=2·x+3 }

TI68K-CALCS PROGRAM AND SCRIPT EDITOR: http://pengels.bplaced.net/index.php/tiedit
TI68K-CALCS EMULATOR http://lpg.ticalc.org/prj_tiemu/
02-06-2017, 08:55 PM
Post: #4
 Arno K Senior Member Posts: 456 Joined: Mar 2015
RE: IDEA: SCRIPTS ON HP-PRIME
Well, if you like those scripts on a ti-calculator you should use one to write them, my personal opinion: I once, back in 1996,7 or 8 had a ti92-plus, a really clumsy device equipped with an 68k processor, I wrote some scripts for my lessons but found that pupils were not really interested in that, they liked the other possibilities much more: enter for example a function and immediately have zeros, extreme- and turning-points and integrals at hand, so I wrote a standard program for this purpose.
Arno
02-08-2017, 02:34 AM (This post was last modified: 02-08-2017 02:35 AM by mark4flies.)
Post: #5
 mark4flies Member Posts: 115 Joined: Jan 2015
RE: IDEA: SCRIPTS ON HP-PRIME
1 +

Go with TI and be happy!
02-08-2017, 02:56 PM (This post was last modified: 02-08-2017 09:29 PM by compsystems.)
Post: #6
 compsystems Senior Member Posts: 1,329 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
Arno K Wrote:Well, if you like those scripts on a ti-calculator you should use one to write them

Electronic translation = (

I like the ti68k calculators, but my purpose is to use the calculators as a tool in the classroom, the ti68k calcs do not have an official emulator, those that exist have BUGs and are not viable as projection extension to the board, besides the Ti68k are discontinued, the successor ti-nspireCXCAS have almost all the ti68k commands, but I do not know why developers took the bad decision to remove the dialog boxes cmd, hundreds of programs that I wrote on ti68k I can not still port them, they also eliminated the scripts app

Arno K Wrote:my personal opinion: I once, back in 1996,7 or 8 had a ti92-plus, a really clumsy device equipped with an 68k processor,

Why do you say it's clumsy?

Arno K Wrote:I wrote some scripts for my lessons but found that pupils were not really interested in that, they liked the other possibilities much more: enter for example a function and immediately have zeros, extreme- and turning-points and integrals at hand, so I wrote a standard program for this purpose.

The idea of creating programs INPUT -> OUTPUT are called BLACK BOX, because it hides what it does, are more valuable programs that shows the steps or procedure of solution so that later the student does it by hand.

It is easier to code a script than a program, I first show the scripts and then programs, later I upload the same scripts but codified as programs, it will be observed that they are more extensive
02-08-2017, 09:10 PM
Post: #7
 Arno K Senior Member Posts: 456 Joined: Mar 2015
RE: IDEA: SCRIPTS ON HP-PRIME
Clumsy, that's here used for thick, not well to be handled, too big, equipped with a small screen.
I noticed it is easier to show the pupils step by step on paper, with the calculator they later should check their results, when wrong/different from calculator output, I rechecked and explained, so a script rendered unneccessary.
Arno
02-09-2017, 05:45 PM (This post was last modified: 02-12-2017 01:26 PM by compsystems.)
Post: #8
 compsystems Senior Member Posts: 1,329 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
Is true, ti-92, ti-92+, ti-v200 are very thick, their screen is somewhat small, but their CAS (1995) is very good, it is still present in the ti-nspire [CX] CAS (2017)

The scripts is the first step, to start in the computer program, the scripts of the ti68k summarize a code because it pauses sentence by sentence, it avoids to print the entry

Demonstration

Script source code
PHP Code:
C:ClrHomeC:setFold(scripts1)C:splitsch() ©"split LCD script:home"C:DelVar eqs, eq1, eq2,answer, slnsX, slnX1, slnX2, slnY1, slnY2, test1, test2C:DelVar x,yC:©"solve the following system of equations"C:©"and check their solutions."C:{ y = x^2, y = 2*x + 3 }→eqsC:eqs[1]→eq1C:eqs[2]→eq2C:(eq2|eq1)→answerC:answer - (2*x + 3)→answerC:factor(answer)→answerC:{ part(left(answer),1)=0,part(left(answer),2)=0 }→answerC:{ answer[1]+3, answer[2]-1 }→slnsXC:slnsX[1]→slnX1C:slnsX[2]→slnX2C:(eqs[1]|slnX1)→slnY1C:(eqs[1]|slnX2)→slnY2C:(eqs[1]|(slnX1 and slnY1))→test1C:(eqs[1]|(slnX2 and slnY2))→test2C:test1 and test2C:"Solns: ("&string(slnX1)&","&string(slnY1)&") ("&string(slnX2)&","&string(slnY2)&")"C:DispHome:done

ported as program
PHP Code:
script1()()Prgm  ClrIO  setFold(scripts1)  ©splitsch() ©"split LCD script:home"  DelVar eqs,eq1,eq2,answer,slnsx,slnx1,slnx2,slny1,slny2,test1,test2  DelVar x,y  Disp "Solve the following system of equations"  Disp "and check their solutions."  Disp "▪{y=x^2,y=2*x+3}→eqs"  {y=x^2,y=2*x+3}→eqs  Disp eqs  Pause  Disp "▪eqs[1]→eq1"  eqs[1]→eq1  Disp eq1  Pause  Disp "▪eqs[2]→eq2"  eqs[2]→eq2  Disp eq2  Pause  Disp "▪(eq2|eq1)→answer"  eq2|eq1→answer  Disp answer  Pause  Disp "▪answer-(2*x+3)→answer"  answer-(2*x+3)→answer  Disp answer  Pause  Disp "▪factor(answer)→answer"  factor(answer)→answer  Disp answer  Pause  Disp "▪{part(left(answer),1)=0,part(left(answer),2)=0}→answer"  {part(left(answer),1)=0,part(left(answer),2)=0}→answer  Pause  Disp "▪{answer[1]+3,answer[2]-1}→slnsx"  {answer[1]+3,answer[2]-1}→slnsx  Disp slnsx  Pause  Disp "▪slnsx[1]→slnx1"  slnsx[1]→slnx1  Disp slnx1  Pause  Disp "▪slnsx[2]→slnx2"  slnsx[2]→slnx2  Disp slnx2  Pause  Disp "▪(eqs[1]|slnx1)→slny"  eqs[1]|slnx1→slny1  Disp slny1  Pause  Disp "▪(eqs[1]|slnx2)→slny2"  eqs[1]|slnx2→slny2  Disp slny2  Pause  Disp "▪eqs[1]|(slnx1 and slny1)→test1"  eqs[1]|slnx1 and slny1→test1  Disp test1  Pause  Disp "▪eqs[1]|(slnx2 and slny2)→test2"  eqs[1]|slnx2 and slny2→test2  Disp test2  Pause  Disp "▪test1 and test2→answer"  test1 and test2→answer  Disp answer  Pause "Solns: ("&string(slnx1)&","&string(slny1)&") ("&string(slnx2)&","&string(slny2)&")"→answer  Disp answer  PauseEndPrgm

More than double the instructions to do the same

Then it is important or not the scripts?
The CASIO classPAD has something similar to execute all the history
02-09-2017, 09:44 PM
Post: #9
 Han Senior Member Posts: 1,883 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
(02-09-2017 05:45 PM)compsystems Wrote:  Then it is important or not the scripts?
The CASIO classPAD has something similar to execute all the history

That is really highly dependent on how students and teachers use the scripts. From an instructor's point of view, it may seem nice -- almost like a live tutor walking a student through a problem. From a student's point of view, it may either a nice tutor (in a sense), or for some, an easy way out of having to actually learn the underlying problem-solving technique. They can merely copy the steps from the script and present it as their own solution without any understanding of what it's doing. How would an instructor, then, know whether their student has truly learned the problem-solving technique being presented through the script vs. simply mimicking what the script does?

In general, each machine will have strengths and weaknesses. But rather than trying to make them all be the same, I would prefer to keep them different and use the appropriate tools for my ever-changing needs. Several unique tools can, in many ways, be better than one generic one.

Graph 3D | QPI | SolveSys
02-12-2017, 10:23 PM
Post: #10
 eried Senior Member Posts: 744 Joined: Dec 2013
RE: IDEA: SCRIPTS ON HP-PRIME
Maybe the suggestion would be a new "halt" command or something like that to allow the user to pause/resume the current program later. (so student can work on the solution).

My website: erwin.ried.cl
 « Next Oldest | Next Newest »

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