--- title: "What MPH?" id: 80799 type: "computer_media" slug: "what-mph" url: "http://localhost/computer_media/what-mph/" markdown_url: "http://localhost/computer_media/what-mph.md" published_at: "2026-11-26T19:45:50+00:00" modified_at: "2026-11-26T19:45:50+00:00" featured_image: url: "http://localhost/wp-content/uploads/2026/11/what-mph-1.png" excerpt: "Speed puzzle with a worked solution, on the TS2068." post_tag: - name: "Downloadable" slug: "downloadable" taxonomy: "post_tag" url: "http://localhost/tag/downloadable/" model: - name: "Timex/Sinclair 2068" slug: "ts-2068" taxonomy: "model" url: "http://localhost/model/ts-2068/" indiv: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" genre: - name: "Mathematics" slug: "mathematics" taxonomy: "genre" url: "http://localhost/type/mathematics/" media_type: "Program" programmers: - name: "Dick Wagner" slug: "dick-wagner" taxonomy: "indiv" url: "http://localhost/indiv/dick-wagner/" download_url: "https://archive.org/download/timex-sinclair-software-archive/What%20MPH%20%281992%29%28Wagner%2C%20Dick%29%28TS2068%29%28US%29%28Program%29.zip" tsrun_member: "What MPH (1992)(Wagner, Dick)(TS2068)(US)(Program)/What MPH (1992)(Wagner, Dick)(TS2068)(US)(Program).tap" mediadate: "1992" images: - url: "http://localhost/wp-content/uploads/2026/11/what-mph-1.png" - url: "http://localhost/wp-content/uploads/2026/11/what-mph-2.png" - url: "http://localhost/wp-content/uploads/2026/11/what-mph-3.png" - url: "http://localhost/wp-content/uploads/2026/11/what-mph-4.png" article_media: - id: 21150 title: "What MPH?" type: "article" url: "http://localhost/article/what-mph/" media_type_tags: "Mathematics" license: false --- # What MPH? A puzzle: at 60 MPH you get to work early, at 30 MPH late, by the same amount of time. How fast should you go to arrive on time? Type your answer; the program says if it is wrong and asks again until you get it. It then offers to show the working (60 miles, 1 hour against 2 hours, so 1.5 hours and 40 MPH). Type GO TO 170 to see the solution without answering. The answer is hidden in the listing as CODE “Y”-CODE “1”. REM 40 says TS1000 users should change the second CODE in lines 110, 120 and 150 to “-” (giving 40 with the ZX81 character set); only the TS2068 form is included here. Published in The Plotter December 1992 ([What MPH?](https://timexsinclair.com/article/what-mph/)). ## Source Code ``` 40 REM TS 1000 users will need to change the second CODE in lines 110, 120, and 150 to "-". 50 REM Program by Dick Wagner, NOV 1992 60 REM Consider the average speed in MPH for more realistic answer, or theoretical constant speed from start to destination. 80 PRINT "When you go to work at 60 MPH you arrive early." 85 PRINT "When you go to work at 30 MPH you arrive late." 90 PRINT "The amount of time you are early is also equal to the amount of time you are late." 95 PRINT "How fast should you go to get towork on time? Use average speed or constant speed.": PRINT 100 INPUT "MY GUESS, ESTIMATE, OR CALCULATION IS ";MPH;"MPH" 110 IF MPH<>INT (CODE "Y"-CODE "1") THEN PRINT MPH;" MPH IS WRONG, TRY AGAIN": GO TO 100 120 IF MPH=INT (CODE "Y"-CODE "1") THEN GO TO 150 150 PRINT "YOU ARE CORRECT WITH ";INT (CODE "Y"-CODE "1");" MPH" 160 PAUSE 150: CLS 170 PRINT "DO YOU WANT THE CALCULATION FOR THE ANSWER TO BE SHOWN? Y OR N.": INPUT A$ 180 IF A$="Y" OR A$="y" THEN GO TO 200 190 IF A$="N" OR A$="n" THEN STOP 200 PRINT "DISTANCE = MPH*TIME WHERE MPH = MILES/HOUR AND TIME IS IN HOURS" 210 PRINT "ASSUME A TRAVEL DISTANCE OF 60 MILES." 220 PRINT "FOR 60 MPH, THE TIME TO DRIVE IS 1 HR." 230 PRINT : PRINT "FOR 30 MPH, THE TIME TO DRIVE IS 2 HR." 240 PRINT : PRINT "THE DIFFERENCE IN TIME IS 1 HR. SO THE NEW TIME WILL BE 1/2 HR. GREATER FROM 60 MPH AND 1/2 HR. LESS FROM 30 MPH." 250 PRINT : PRINT "FOR 60 MPH BASE: MPH=60/(1 HR+1/2 HR)" 260 PRINT "THE SOLUTION IS NEW MPH = 40" 270 PRINT : PRINT "FOR 30 MPH BASE: MPH=60/(2 HR-1/2 HR)" 280 PRINT "THE SOLUTION IS NEW MPH = 40" 300 PRINT : PRINT "YOU MIGHT TRY OTHER DRIVING SPEEDS AND THE DISTANCE NEED NOTBE COMPARED TO ONE OF THE SPEEDS, BUT THE SOLUTION IS EASIER IF YOU DO." ```