--- title: "Penny Gambler" id: 76550 type: "computer_media" slug: "penny-gambler" url: "http://localhost/computer_media/penny-gambler/" markdown_url: "http://localhost/computer_media/penny-gambler.md" published_at: "2026-11-11T08:02:29+00:00" modified_at: "2026-11-11T08:02:29+00:00" author: "David Anderson" featured_image: url: "http://localhost/wp-content/uploads/2026/11/penny-gambler-1.png" excerpt: "A penny-ante guessing game in which the computer cheats, with secret signs that tell the person in the know who really won." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" - name: "TS 1000" slug: "ts1000" taxonomy: "post_tag" url: "http://localhost/tag/ts1000/" - name: "ZX81" slug: "zx81" taxonomy: "post_tag" url: "http://localhost/tag/zx81/" model: - name: "Sinclair ZX81" slug: "zx81" taxonomy: "model" url: "http://localhost/model/zx81/" - name: "Timex/Sinclair 1000" slug: "ts-1000" taxonomy: "model" url: "http://localhost/model/ts-1000/" indiv: - name: "R. W. Landesman" slug: "r-w-landesman" taxonomy: "indiv" url: "http://localhost/indiv/r-w-landesman/" genre: - name: "Gambling" slug: "gambling" taxonomy: "genre" url: "http://localhost/type/gambling/" media_type: "Program" programmers: - name: "R. W. Landesman" slug: "r-w-landesman" taxonomy: "indiv" url: "http://localhost/indiv/r-w-landesman/" download_url: "https://archive.org/download/timex-sinclair-software-archive/Penny%20Gambler%20%281983%29%28Landesman%2C%20R.%20W.%29%28TS1000%29%28US%29%28Program%29.zip" mediadate: "1983" images: - url: "http://localhost/wp-content/uploads/2026/11/penny-gambler-1.png" - url: "http://localhost/wp-content/uploads/2026/11/penny-gambler-2.png" article_media: - id: 19517 title: "Penny Gambler" type: "article" url: "http://localhost/article/penny-gambler/" media_type_tags: "Gambling" license: false --- # Penny Gambler A practical joke disguised as a guessing game. Bet a penny, a nickel or a dime and guess the computer’s number from 1 to 5; a right guess is supposed to pay five times the bet. The computer never plays fair: it only picks from 1 to 4, it changes its number when you guess right, and it always says you lost and that you owe it the money bet. The article lets the owner in on two secrets. When the message SORRY YOU LOST YOUR BET has no period at the end, the player really won. And when the player quits, the number in the bottom right corner is the true balance: positive means the player owes the computer that many cents, negative means the computer owes the player. Published in Syntax July 1983 ([Penny Gambler](https://timexsinclair.com/article/penny-gambler/)). ## Source Code ``` 10 REM "PENNY GAMBLER" 15 PRINT TAB 9;"PENNY GAMBLER" 20 PRINT AT 1,9;"▀▀▀▀▀▀▀▀▀▀▀▀▀" 25 PRINT 30 LET P=0 35 LET M=0 40 PRINT "WANNA TRY YOUR LUCK." 45 PRINT TAB 5;"YES -- TYPE ""1"" AND ""ENTER""" 50 PRINT TAB 5;"NO --- TYPE ""2"" AND ""ENTER""" 55 INPUT A 60 CLS 65 IF A=1 THEN GOTO 95 70 IF A=2 THEN PRINT AT 7,11;"CHEAPSKATE" 75 PRINT AT 8,11;"▀▀▀▀▀▀▀▀▀▀" 80 IF A>2 THEN PRINT AT 7,13;"DUMMY" 85 PRINT AT 16,0;"TO TRY AGAIN -- TYPE ""RUN"" AND ""ENTER""" 90 STOP 95 PRINT TAB 9;"PENNY GAMBLER" 100 PRINT AT 5,0;"YOU MAY BET A PENNY, A NICKEL, OR A DIME. I▝LL PICK A RANDOM NUMBER FROM 1 TO 5. GUESS IT AND YOU WIN FIVE TIMES YOUR BET." 105 PRINT 110 PRINT 115 PRINT "HOW MUCH DO YOU WANT TO BET?" 120 PRINT TAB 3;"PENNY -- TYPE ""1"" AND ""ENTER""" 125 PRINT TAB 3;"NICKEL - TYPE ""5"" AND ""ENTER""" 130 PRINT TAB 3;"DIME --- TYPE ""10"" AND ""ENTER""" 135 INPUT B 140 IF B=1 OR B=5 OR B=10 THEN GOTO 160 145 IF B<>1 AND B<>5 AND B<>10 THEN CLS 150 GOTO 95 155 STOP 160 CLS 165 PRINT TAB 9;"PENNY GAMBLER" 170 PRINT AT 5,0;"OK - WHAT▝S YOUR GUESS 1, 2, 3, 4, OR 5?" 175 LET X=INT (RND*4)+1 180 INPUT Z 185 CLS 190 PRINT TAB 9;"PENNY GAMBLER" 195 IF X<>Z THEN PRINT AT 7,0;"SORRY YOU LOST YOUR BET." 200 IF X=Z AND B=1 THEN LET M=M+6 205 IF X=Z AND B=5 THEN LET M=M+30 210 IF X=Z AND B=10 THEN LET M=M+60 215 IF X=Z THEN LET X=Z+1 220 PRINT AT 7,0;"SORRY YOU LOST YOUR BET" 225 PRINT "YOU PICKED NUMBER ";Z 230 PRINT "THE COMPUTER PICKED ";X 235 IF B=1 THEN LET P=P+1 240 IF B=5 THEN LET P=P+5 245 IF B=10 THEN LET P=P+10 250 PRINT AT 15,0;"WANNA TRY AGAIN" 255 PRINT TAB 5;"YES -- TYPE ""1"" AND ""ENTER""" 260 PRINT TAB 5;"NO --- TYPE ""2"" AND ""ENTER""" 265 INPUT C 270 CLS 275 IF C=1 THEN GOTO 95 280 IF C=2 THEN PRINT AT 7,12;"QUITTER" 285 IF C>2 THEN PRINT AT 7,12;"DUMMY" 290 PRINT AT 9,0;"YOU OWE ME ";P;" CENTS." 295 PRINT "PAY UP NOW. DADDY NEEDS SOFTWARE." 300 PRINT AT 11,0;"▀▀▀▀▀▀▀▀▀▀" 305 PRINT AT 20,0;"TO START OVER - TYPE ""RUN"" AND ""ENTER""." 310 PRINT AT 21,28;P-M 315 STOP ```