A blog is that is all about mathematics and calculators, two of my passions in life.

Tuesday, November 5, 2013

HP Prime Programming Tutorial #3: WHILE, INPUT, KILL, REPEAT, GETKEY

This tutorial is going to cover a lot, each with some new programming commands in this series. I hope you are ready for the intensity. :)

WHILE, INPUT, KILL

HP Prime Program: TARGET. TARGET is a game where you provide a guess to get a desired number. If you miss, the calculator will tell you if number is higher and lower. At the end of the game, the calculator gives you how may picks you needed to get the target number.

WHILE: Repeat a number of commands while a specific condition is test.

WHILE condition is true DOcommandsEND;

Access: Tmplt, 3. Loop, 5. WHILE

Caution: Watch your ENDs! Make sure an END is with each loop and the program itself. Press the soft key Check to check your work.

INPUT: Creates an input screen for variables. On the HP Prime, the input can asked for more than one input. TARGET demonstrates INPUT with one prompt.