Saturday, July 29, 2023

DM41 and HP 41C: Lagrangian Interpolation

DM41 and HP 41C:  Lagrangian Interpolation



Introduction


The program LARG estimates a point (x, y) using the Lagrangian interpolating polynomial below:


y =

  y0 * (x - x1) * (x - x2) ÷ ((x0 - x1) * (x0 - x2))

  + y1 * (x - x0) * (x - x2) ÷ ((x1 - x0) * (x1 - x2))

  + y2 * (x - x0) * (x - x1) ÷ ((x2 - x0) * (x2 - x1))


The polynomial has three set points that defined points (x0, y0), (x1, y1), and (x2, y2).  


This program is based off the Interpolations program for the HP 67 and HP 97 calculators.  (see source below)



Swiss Micros DM41/HP41C Program LARG


01  LBL ᵀ LARG

02  SF 27

03  CF 00

04  STOP


05  LBL A

06  STO 01

07  x<>y

08  STO 04

09  RTN


10  LBL B

11  STO 02 

12  x<>y

13  STO 05

14  RTN


15  LBL C

16  STO 03

17  x<>y

18  STO 06

19  CF 00

20  RTN


21  LBL D

22  STO 00

23  FS? 00

24  GTO 15

25  RCL 04

26  RCL 05

27  -

28  RCL 04

29  RCL 06

30  -

31  *

32  ST/ 01  

33  RCL 05

34  RCL 04

35  -

36  RCL 05

37  RCL 06

38  -

39  *

40  ST/ 02

41  RCL 06

42  RCL 04

43  -

44  RCL 06

45  RCL 05

46  - 

47  *

48  ST/ 03

49  SF 00


50  LBL 15

51  RCL 00

52  RCL 05

53  -

54  STO 07

55  RCL 00

56  RCL 06

57  -

58  STO 08

59  *

60  RCL 01

61  *

62  RCL 00

63  RCL 04

64  -

65  STO 09

66  RCL 08

67  *

68  RCL 02

69  *

70  +

71  RCL 09

72  RCL 07

73  *

74  RCL 03

75  *

76  +

77  STOP


78  LBL E

79  CF 27

80  CF 00

81  END



Memory Registers Used:


R01 = y0

R02 = y1

R03 = y2


R04 = x0

R05 = x1

R06 = x2


R07, R08, R09


Flag 0 is used to allow for multiple calculations.


Flag 27 is the User keyboard flag.   


Label 15 is a local label.  Any labels 15-99 are local labels that can be placed anywhere in the program.  


ST/ is STO÷.


STOP is the R/S key.  



Instructions


The program LARG is set up to use the USER keyboard as follows:


Key A ([Σ+]):  Enter the point (x0, y0).  Type x0, press [ENTER], type y0, press [Σ+].


Key B ([1/x]):  Enter the point (x1, y1).  Type x1, press [ENTER], type y1, press [1/x].


Key C ([√]):  Enter the point (x2, y2).  Type x2, press [ENTER], type y2, press [√].


Key D ([LOG]):  Calculate y.   


Key E ([LN]):  Exits the program and turns off the user keyboard.




Example



An estimated polynomial runs through the points (1, 7), (3, 9), and (5, 4).   Estimate the point at x = 2 and x = 6.


XEQ LARG


1 ENTER 7 [Σ+] (A)

3 ENTER 9 [1/x] (B)

5 ENTER 4 [√] (C)


2 [LOG] (D) returns about 8.8750


6 [LOG] (D) returns about -1.1250


When done, press [LN] (E) to exit or turn off the user keyboard.



Source


HP 67/97 Math Pac I.  Hewlett Packard.  Corvallis, OR.  1976



Eddie 



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Monday, July 24, 2023

Review: Pen + Gear SS-6613 Scientific Calculator

Review:  Pen + Gear SS-6613 Scientific Calculator



For some of us, it's already near back-to-school season.  Need a scientific calculator and on a budget?  The Pen+Gear SS-6613, which I purchased from WalMart for five bucks, may be fit. (or really, at least one to hold you over)






Quick Facts


Model: SS-6613

Company: Pen + Gear 

Production Years:  2022 - present

Power:  Battery, 1.5V

Type:  Scientific

Operating System:  Algebraic

Memory Registers:  9:  A, B, C, D, E, F, X, Y, M 

Display:  Two lines.  10-digit numbers


The display has two lines.  The top line is for equations and expressions.  The bottom line is for results.  


Features


The feature set of the Pen + Gear calculator is similar to the Casio fx-991 MS series.  You get a lot a mileage for a five dollar calculator (that isn't an app).


Complex Mode:   complex mode arithmetic with polar/rectangular conversions


Statistics:  Single data (SD) and two-variable data statistics.  Normal distribution functions (lower tail area, mid area, and upper tail area), conversion to z (labeled t) functions are included.   The six regression models available are:  linear, logarithmic, exponential, power, inverse, and quadratic.  


Equation mode:  

Unknowns:  2 or 3:  2 x 2 or 3 x 3 linear systems

Degree: 2 or 3:  roots of quadratic or cubic polynomials


Matrices:  3 matrices up to 3 rows and 3 columns.   Functions include row reduction form, transpose, inverse (by the [ X~1 ] key), and determinant.


Vectors:  3 vectors, either 2D or 3D.  Cross product (by the [ × ] key), dot product, norm (via Abs, but it's hidden)


40 scientific constants and U.S.-SI conversions.   Constants and conversions are called up by number codes, so don't lose the paper manual that comes with the calculator.  


We also get multi-expression feature, which allows us to connect calculations with a colon (:).  However, on the Pen + Gear, this is a hidden feature as the colon is not printed on the calculator.  The colon is called up by pressing [ ALPHA ] [ SDX ].


The manual to the equivalent Casio fx-991MS is presented into two manuals:


Basic Operations, Complex Numbers, Statistics, Equations:

https://support.casio.com/pdf/004/fx115MS_991MS_E.pdf


Matrices, Vectors, Integration, Derivative, Constants, Conversions:

https://support.casio.com/pdf/004/fx570MS_991MS_E.pdf



Batteries


A major difference is the battery used.   Instead of a AA battery, a coin battery (I'm thinking AR44 or LR44) but the manual states the battery is 1.5 volts.   The battery is attached to the calculator's motherboard which will need careful removal.  I am thinking that company expects the user to buy a new calculator when the battery runs out.  I would prefer a better battery compartment.  






Keyboard





Wow, the keyboard.   First, all the text is in white.  No differentiation between the shifted functions, regular functions, and alpha letters.  Also the manufacture used plain text, which does not include advance math characters and Greek characters. 


Here are the all the keyboard quirks I could find:


[ SHIFT ] (Pai):   π  

[ SHIFT ] (sqrt3):  ³√

[ X~1 ]:  x⁻¹

[ SDX ]:  ∫ dx

[ YX ]:  ^ 

[ SHIFT ] (sqrtX):  √

[ SHIFT ] (10x): 10^x

[ SHIFT ] (ex):  e^x

[ SHIFT ] (R<Q):  r∠θ

[ SHIFT ] (<):  ∠


The strangest is the Pai for pi (π).  Theta, θ, could have been substituted with ang (for angle).   I could understand the rest of it.   


Hidden:


[ ALPHA ] [ SDX ]:  colon  ( : )

[ ALPHA ] [ ) ]:  abs  (absolute value, available only in complex and vector modes)


The keyboard is the weakest point of this calculator.  



Final Thoughts


The Pen + Gear SS-6613 Scientific Calculator has a lot of features for a low-cost calculator.  Unfortunately, the lack of keyboard color and math characters are what hold me back from giving this calculator a full recommendation.  Experienced users only. 


Eddie



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, July 22, 2023

HP Prime and TI-84 Plus CE: Binary Dot Product

HP Prime and TI-84 Plus CE:   Binary Dot Product



Binary Dot Product



The binary, or inner product, of two binary integers is calculated by:


1.  Using the AND operator on each bit.

2.  Count the number of 1 bits from the result.

3.  Take the result mod 2.   The result will either by 0 (an even number of 1 bits) or 1 (an odd number of 1 bits).


Examples:


Binary dot product of 111011 and 100110.


111011

100110


From the left:

1st bit:  1 and 1 = 1

2nd bit:  1 and 0 = 0

3rd bit:  1 and 0 = 0

4th bit: 0 and 1 = 1

5th bit:  1 and 1 = 1

6th bit: 1 and 0 = 0


Number of 1 bits:  2


2 mod 2 = 0


Result:  111011 • 100110 = 0



Binary dot products are used in various applications, especially in quantum mechanics.  Specific examples include the Bernstein-Vazirani Algorithm.  




Program Notes



In order to compare the individual bits, the two binary integers are converted to strings.   A loop is executed to compare string characters one by one.  


The HP Prime has the BITAND function which compares each pairs of bits with the AND operation.  





HP Prime Program:  BINDOT



EXPORT DOTBIN(x,a)

BEGIN

// EWS 2023-05-13

// Bernstein-Vazirani

// x, a: binary integers

LOCAL f,m,i,s,c;


f:=BITAND(x,a);

// convert to strings

c:=CEILING(LOG(f)/LOG(2));

s:=STRING(f);


FOR i FROM 2 TO c+1 DO

IF MID(s,i,1)=="1" THEN

m:=m+1;

END;

END;


m:=m MOD 2;  

RETURN m;

END;



TI-84 Plus CE Program:  DOTBIN



"EWS 2023-05-11"

Disp "BINARY DOT PRODUCT"

Input "BINARY 1? ",Str1

Input "BINARY 2? ",Str2

length(Str1) → A

length(Str2) → B


If A ≠ B

Then

If A < B

Then

For(I, 1, B - A)

"0" + Str1 → Str1

End

Else

For(I, 1, A - B)

"0" + Str2 → Str2

End

End

End


ClrHome

Disp Str1, Str2

Pause


0 → M


For(I, 1, max(A,B))

If sub(Str1, I, 1)="1" and sub(Str2, I, 1)="1"

Then

M + 1 → M

End

End


remainder(M,2) → M

Disp M




Examples


Example 1:  1101 • 1001001 = 1


Example 2:  11100 • 11110 = 1


Example 3:  1011110 • 10101 = 0



Source

 

Biswas, Shrey.  "The Bernstein-Vazirani Algorithm: Quantum Algorithms Untangled"  Quantum Untangled.  Medium.  February 4, 2021.   Retrieved May 12, 2023.  https://medium.com/quantum-untangled/the-bernstein-vazirani-algorithm-quantum-algorithms-untangled-67e58d4a5096





Eddie


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, July 15, 2023

Casio fx-3900PV: Program Bank

Casio fx-3900PV:  Program Bank



Here are a few programs for the Casio fx-3900Pv.  These programs should also work on the fx-3600P/fx-180P series (as long as the number of steps is less than 38) except that we can review and edit the steps on the fx-3900Pv.   See my review of the fx-3900Pv here:  


http://edspi31415.blogspot.com/2023/05/retro-review-casio-fx-3900pv.html



Error Function


The program allows the you to calculate the error function:


erf(b) = ∫( 2 * e^(-x²) ÷ √θ dx, x = 0, x = b)


Code:


001   Min

002   MR

003   x²

004   +/-

005   eˣ

006   ×

007   2

008   ÷

009   π

010   √

011   =



To calculate the erf(b):  run integral mode (Mode 1).  Select the program, enter n to get 2^n divisions by pressing [SHIFT] [RUN].   Next, enter 0 [RUN], then b [RUN].


Examples:  n = 6,  (2^6 = 64 divisions)


erf(1.5):

a = 0,  b = 1.5,  Result:  9.661051 * 10^-1


erf(0.4):

a = 0, b = 0.4,  Result:  4.28392 * 10^-1


erf(3.9):

a = 0, b = 3.9,  Result:  9.9999997 * 10^-1




Range and Height of a No-Air Projectile


R = v^2 * sin(2 * θ) ÷ g


H = v^2 * sin^2 θ ÷ (2 * g)


where:

R = range of the projectile (m)

H = maximum height of the projectile (m)

v = initial velocity (m/s)

θ = angle in degrees

g = Earth's gravity = 9.80665 m/s^2


Inputs:

K1 = v

K2 = θ


Outputs:

K3 = R

K4 = H


Used:

K5 = g


Code:


001   DEG  ( MODE 4 )

002   9

003   .

004   8

005   0

006   6

007   6

008   5

009   Kin 5

010   Kout 1

011   x²

012   ÷

013   Kout 5

014   ×

015   (

016   2

017   ×

018   Kout 2

019   )

020   SIN

021   =

022   Kin 3

023   HLT

024   Kout 1

025   x²

026   ×

027   Kout 2

028   SIN

029   x²

030   ÷

031   2

032   ÷

033   Kout 5

034   =

035   Kout 4


Examples:


Inputs:  K1 = 11.9 m/s,  K2 = 40°

Outputs:

R = 14.22082219 m

H = 2.98317166312 m


Inputs:  K1 = 11.9 m/s,  K2 = 60°

Outputs:

R = 12.0558115 m

H = 5.415075484 m

   


Magnitude and Phase of a LCR Series Circuit


Z = √(R² + (w * L - 1 ÷ (w * C))² )


θ = arctan((w * L - 1 ÷ (w * C)) ÷ R)


where:

Z = magnitude (Ω)

θ = phase angle (degrees)

R = resistance (Ω)

L = inductance (H)

C = capacitance (F)

w = angular frequency, where w = 2 * π * f

f = frequency


Inputs:  R, f, C, L

M = f  

K2 = L

K3 = R

K4 = C


Outputs:

K1 = w

K5 = Z

K6 = θ


Note that the source (see Source section below) omitted the square root in the formula for Z.  The above formula is correct.


Code:


001   DEG    (Mode 4)

002   MR

003   Kin 1

004   2

005   Kin× 1   (shown as K×1)

006   π

007   Kin× 1    (shown as K×1)

008   Kout 1

009   ×

010   Kout 2

011   -

012   (

013   Kout 1

014   ×

015   Kout 4

016   )

017   1/x

018   =

019   Kin 6

020   Kout 3

021   x²

022   +

023   Kout 6

024   x²

025   =

026   √

027   Kin 5

028   HLT

029   (

030   Kout 6

031   ÷

032   Kout 3

033   )

034   tan⁻¹

035   =

036   Kin 6



Example:


Inputs:

f = 100 Hz,  [ Min ]

L = 4 * 10^-3 H  (store in K2)

R = 6300 Ω  (store in K3)

C =  5 * 10^-6 F  (store in K4)

Outputs:

Z = 6307.909915 Ω  (K5)

θ = -2.869631956° (K6)



Quadratic Equations:  Real Roots


Solve the equation: 


x^2 + K1 * x + K2 = 0


The roots are:


x = (-K1 ± √(K1^2 - 4 * K2)) ÷ 2


Inputs:

K1 = coefficient of x

K2 = constant


Outputs:

K4 = root 1

K5 = root 2


Used:  K3 = √(K1^2 - 4 * K2)


Code:


001    (

002    Kout 1

003    x²

004    -

005    4    

006    ×

007    Kout 2

008    )

009    √

010    Kin 3

011    (

012    Kout 3

013    +/-

014    -

015    Kout 1

016    )

017    ÷

018    2

019    =

020    Kin 4

021    HLT

022    +

023    Kout 3

024    =

025    Kin 5



Example:


Solve x^2 - 19 * x + 10 = 0

Inputs:

K1 = -19

K2 = 90

Outputs:  9, 10



Source 

(for Range and Height of a No-Air Projectile and Magnitude and Phase of a LCR Series Circuit):


Rosenstein, Morton.   Computing With the Scientific Calculator.  Casio.  1986



Enjoy,


Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Monday, July 10, 2023

Retro Review: Sears Electronic Slide Rule

Retro Review: Sears Electronic Slide Rule



Quick Facts


Model: Electric Slide Rule,  801.58771

Company: Sears

Production Years:  1974 - mid 1970s

Power:  Battery, originally AA chargeable NiCad*

Type:  Scientific

Operating System:  Chain

Memory Registers:  1

Display:  One line:  8 digits, 2 lights:  one for overflow (error), one for negative numbers

Same Key Set as:   Rockwell 61R


*  I purchased this calculator at the Pasadena City College Swap Meet on July 2, 2023.  The calculator is in great condition, along with a great leather case and instruction manual.   The calculator was re-configured to run on 4 regular AA batteries, to that I'm very grateful.





Keyboard and Scientific Functions 


Most of the functions available are shifted functions.  The equals key is in an usual place, on the 2nd row from the top, above the arithmetic keys.  Access the shifted functions (written in white) by pressing the black key [ f ]. 


Scientific Functions Available:


Logarithm:  ln, log, e^x, 10^x

Roots and Powers:  √x, x^y, 1/x

Trigonometry:  sin, cos, tan, arc (inverse)

Memory Functions:  m+, m-, m+x^2  (add the square of a display to memory) x←m (recall), x→m (store), x←→m (exchange with memory), x←→y (swap arguments, not shifted) 


DR:  Data Recovery function is activated the key sequence [ f ] [ f ] (not a typo, DR is the shifted function of [ f ]).  What this does is two-fold:


1.  Erase the last number entered.

2.  Activate the intended shifted function without having the need to press [ f ] again.


Example:  e^4


[ 4 ] [ 4 ]:   Display:  44

[ f ] [ f ]:   Erases the last 4,  Display:  4

[ 4 ]:  Calculates e^4, Display:  54.59814



CF:  Clear Function.   Cancels out the shifted function [ f ].


Example:  12 + 89


[ 1 ] [ 2 ] [ + ]

[ f ]:   next key pressed will be a shifted function

[ c ce ] (cf):  cancels out that shifted function

[ 8 ] [ 8 ] [ = ]:  Display: 100


There are two switches:  Power (On/Off) on the left, and Angle mode (Degrees/Radians) on the right.  


Negative Numbers





There was no room on the display for a negative sign (apparently), instead negative numbers are indicated by a bright red light on the upper right hand of the display, next to the clear Neg imprint on the screen.  


I would prefer the negative sign on the display, to the left of the number.  


Chain Mode


The Slide Rule operates in chain mode, which is the calculations happen exactly the way they are entered, with no respect to the order of operations.   Note that there are no parenthesis keys.


For example:


4 + 3 × 8 returns 56


3 × 8 + 4 returns 28



Powers


Assume that n is a positive integer.


a^n  can be accomplished by entering a, repeatedly pressing [ × ] n-1 times, finishing by pressing [ = ].


7^5:  7 [ × ] [ × ] [ × ] [ × ] [ = ].  Result:  16807

[ × ] four times. 



1/(a^n) can be accomplished by entering a, repeatedly pressing [ ÷ ] n+1 times, finish by pressing [ = ].


4^-3:  

4 [ ÷ ]:  Display:  4

[ ÷ ]:  Display:  1   (4^0 = 1)

[ ÷ ]:  Display:  0.25   (4^-1 = 1/4)

[ ÷ ]:  Display :  0.0625  (4^-2 = 1/16)

[ = ]:  Display:  0.015625  (4^-3 = 1/64)


The power function x^y operates on the formula e^(y × ln x).   This may lead to rounding errors.  





Example:


2^3 = 8.


2 [ × ] [ × ] [ = ]  returns 8.   The exact answer.

2 [ f ] [ 6 ] (x^y) 3 [ = ] returns 7.999993


Floating Point Rounding Errors


One drawback of the Electronic Slide rule is the rounding floating point errors.  


70 [ f ] [ ÷ ] (1/x)  returns 0.0142857

Press [ f ] [ ÷ ] (1/x) again returns 70.00007


0.5 [ f ] [ 0 ] (arc) [ 2 ] (cos) returns 59.99999 degrees (it should be 60 degrees)


The forensic test returns 10.4382 (9 sin cos tan arctan arccos arcsin).  


I think the calculator can handle numbers to what the display capacity allows.  There is no internal guard digits to help with accuracy.    


Final Thoughts


I like the feel of the calculator.   The screen has large green numbers which makes the display easy to read.   The keys are are pretty responsive, especially back in the day when it comes to lower-cost calculators in the 1970s (around $100).  


I am not the biggest fan of the negative number indicator, the Rockwell 61R has a negative sign.  Not a deal breaker, though.  The good thing is that red indicator light is bright.  


The Slide Rule is great for fans of Chain Mode (non-algebraic mode).   


If you buy one be sure that:  the charging cord and rechargeable batteries are included and in good working order or the calculator is modified to work on regular AA batteries.


I like how the manual goes in depth with the operations and its library of applications.  



Sources:


Download the manual from Katie Wasserman's Page:  


Sears Electronic Slide Rule:  

https://www.wass.net/manuals/Sears%20Slide%20Rule.pdf


Rockwell 61R:

https://www.wass.net/manuals/Rockwell%2061R.pdf


calculator.org's page on the  Sears Electronic Slide Rule (retrieved July 2, 2023):

https://www.calculator.org/calculators/Sears_Electronic_Slide_Rule.html




Eddie



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Saturday, July 8, 2023

HP Prime and Python (Casio fx-9750GIII): Direct Sum and Tensor Product

HP Prime and Python (Casio fx-9750GIII):  Direct Sum and Tensor Product



This blog is about two operations in tensor algebra.  



DIRSUM:  Direct Sum


DIRSUM is the direct sum of two tensors, specifically column vectors.   The direct sum, symbolized by ⊕ (circle with a plus symbol in it), stacks column vectors on top of each other.  The order of the two vectors matters.


Example:


V1 = [ [ 2 ] [ 3 ] ]

V2 = [ [ 5 ] [ 6 ] [ 8 ] ]


V1 ⊕ V2 = [ [ 2 ] [ 3 ] [ 5 ] [ 6 ] [ 8 ] ]


V2 ⊕ V1 = [ [ 5 ] [ 6 ] [ 8 ] [ 2 ] [ 3 ] ]


The dimension of the direct sum is the sum of the dimensions of the vectors.



TENSOR:  Tensor Product 


The tensor product, also known as the outer product multiplies the numbers from V1 to each element V2 in order.   The tensor product can be represented in a column vector or a matrix.  





 If V1 and V2 are matrices, the outer product is calculated as:


V1 ⊗ V2 = V1 × V2ᵀ = V1 × transpose(V2)


Example:


V1 = [ [ 2 ] [ 3 ] ]

V2 = [ [ 5 ] [ 6 ] [ 8 ] ]


V1 ⊕ V2 = [ [ 10, 12, 16 ] [ 15, 18, 24 ] ]


V2 ⊕ V1 = [ [ 10, 15 ] [ 12, 18 ] [ 16, 24 ] ]


The tensor product is not commutative, order matters.  




HP Prime Programs:  DIRSUM and TENSOR


Note: DIRSUM and TENSOR accepts matrices or vectors in the form of column matrices.  


EXPORT DIRSUM(v,w)

BEGIN

// direct sum of 2 vectors

// 2023-04-30 EWS

LOCAL lv,lw,lc;

lv:=mat2list(v); 

lw:=mat2list(w);

lc:=CONCAT(lv,lw);

RETURN list2mat(lc,1);

END;


EXPORT TENSOR(v,w)

BEGIN

// tensor product of 2 vectors or matrices

// 2023-04-23 EWS

RETURN v*TRN(w);

END;





Python:  tensor.py


In this file, the tensor and dirsum functions are meant to be used with vectors only.  No outside libraries are required. 


# tensor file


# outer product

def tensor(x,y):

  t=[]

  lx=len(x)

  ly=len(y)

  for i in range(lx):

    c=[]

    for k in range(ly):

      w=x[i]*y[k]

      c.append(w)

    t.append(c)  

  return t


# direct sum

def dirsum(x,y):  

  return x+y


Source:


Bradley, Tai-Danae.  "The Tensor Products, Demystified"  math3ma.com   November 18, 2018.  https://www.math3ma.com/blog/the-tensor-product-demystified  Accessed April 24, 2023.




Eddie 


All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Monday, July 3, 2023

Python: Five-Letter Scramble Game

Python:   Five-Letter Scramble Game








Scripts



scramble.py:  

Python 3


Calculators:

Numworks

TI-83 Premium CE Python Edition

TI-84 Plus CE Python


Python Scramble App:

HP Prime


Download the files here:   

https://drive.google.com/file/d/1wDTGv40HMGnaVoB_00Z9_YM1SQu_mItH/view?usp=sharing


Nuwmorks Page:

https://my.numworks.com/python/ews31415/scramble


Object


The object of the game is to unscramble five-letter words.  You only get one chance, but there is no time limit.   Try to get a high score!  



Note:  I did my best to include to include only words that have one correct permutation, that is you can only rearrange the letters one way.  There are no proper names.   (Hence words like heart/earth, diver/drive, sleet/steel, input/print, scare/cares, etc. are eliminated).   



If you want to know how the code was put together, please let me know.   



Have fun,


Eddie 



All original content copyright, © 2011-2023.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.