HigherLower

Description

Start the program with f LBL A.
The calculator generates secret number (and stores it in R6, shht, don't tell the user),
The user iteratively guesses a number from 1 to 100 by just tapping digits (no enter needed) and then presses R/S (Run/Stop) and
The user gets back answer (+)1 if he should aim higher, blinking 1 time. The user can guess again then.
The user gets back answer (-)1 if he should aim lower, blinking 1 time. The user can guess again then.
The user gets back correctly guessed number (in 1..100) if he guessed correctly, blinking 3 times and game is over then.
by Peter Sels, © 2020 Logically Yours BV.

Program Resources

Labels

Name Description
 A Program entry label, where the program first randomly generates its secret number
 1 Start of guessing label, user enters a number here which will be judged lower, higher or equal to secret number by the program.
 2 Where guess is too high or correct
 3 Where guess is right

Storage Registers

Name Description
 6 X6 contains the secret number generated by the calculator and to be guessed by the user.

Program

Line Display Key Sequence Line Display Key Sequence
000 018 22 2 GTO 2
001 42,21,11 f LBL A 019 1 1
002 42 36 f RAN # 020 42 31 f PSE
003 1 1 021 22 1 GTO 1
004 0 0 022 42,21, 2 f LBL 2
005 0 0 023 30
006 20 × 024 43 20 g x=0
007 43 44 g INT 025 22 3 GTO 3
008 1 1 026 1 1
009 40 + 027 16 CHS
010 44 6 STO 6 028 42 31 f PSE
011 43 35 g CLx 029 22 1 GTO 1
012 42,21, 1 f LBL 1 030 42,21, 3 f LBL 3
013 42 31 f PSE 031 45 6 RCL 6
014 31 R/S 032 42 31 f PSE
015 36 ENTER 033 42 31 f PSE
016 45 6 RCL 6 034 22 1 GTO 1
017 43 10 g x≤y