I decided to write an informal introduction to Python called 'How To Code Like a Snake'.
Here's the start of it.
HOW TO CODE LIKE A SNAKE
by Jonah Mann
--- Preface ---
But snakes don't have hands.
Well, they don't have feet either, but that doesn't stop them from getting around.
Oh yeah, this book's about Python.
It's a programming language, but I'll explain that in the intro.
--- Contents ---
02. Set up
13. Date & Time
16. File I/O
--- 01. Introduction ---
Python is a programming language. It can be used to make stuff do stuff.
By stuff I mean computers and by stuff I mean computations.
This book will explain how you can use Python to make stuff do stuff.
Oh yeah, and the contents are pretty much lifted from another tutorial, so.
--- 02. Set up ---
Installation is a bit boring to explain (and do), so just go to the Python website, download the stuff and get it working.
By the way, I'm assuming Python3, so if you're in the future and using version 4 or greater, than I don't know. Things might not work.
--- 03. Syntax ---
Let's make the computer do something. We're going to make it say hello. How friendly.
That's it. One line. That's the program.
So how do you run it?
There are two ways. The first way means you use Python like a big calculator, doing one thing at a time. The second way means you write out the entire program, then run it.
The first way goes like this:
Open a terminal (or command prompt) and write
or whatever works for you.
Then write the program above. You know, that one line one.
The computer should go
If it doesn't work, then something is wrong.
More in next post.