Below you will find pages that utilize the taxonomy term “Python”
MOS paper tape format
I built the world’s worst paper tape reader some weeks ago. It works pretty okay on anything with a USR-style port like a KIM-1 clone or a VIC-20.
It at least attempts to live up to the world’s worst name. Paper tape was (and is) an interesting medium. Sure it’s hard to work with and fragile, but it also has the advantage of being slow. I mean, what’s not to like??!!!
A visual 100 Door Problem solution in Python
Last year, we did the 100 door problem on many platforms in BASIC and Assembly language.
The 100 door problem is:
- There are 100 closed doors in a row.
- You walk past the doors 100 times (100 passes)
- The first time, visit every door. If the door is closed, open it. If it is open, close it. In programming, you’d probably call this toggling the door so let’s call it that.
- The second time, ONLY visit every 2nd door and toggle it. (door 2, 4, 6, etc)
- The third time, ONLY visit every 3rd door and toggle it. (door 3, 6, 9, etc)
Keep going through this loop over and over until you get to the loop where there’s only the last door.
Permutations of 1 to 9 in Python, BASIC, and 6502 Assembly
Someone asked me this week if I would help him with a graph theory problem on 8-Bit machines. The first task was to get all permutations of 1 to 9. Since the total permutations is 9! (362,880) I knew this would take a while.
Learning without learning, the standard library problem
There are no shortcuts to pretty much anything worth doing. If you fail to learn the basics, then when you get to more advanced things, the basics will feel like black magic, and the thing you’re working on will only make sense on the surface.