You are viewing Chapter 0.1: For the First-time Programmer of the Guide to Learning Python for OpenRPG. You can also go to the table of contents to see the full list of available chapters.
Welcome! If you are reading this section, then you have probably never coded (note: "coded" is a synonym for "programmed") anything ever before, and probably know very little about how programming actually works. Thus, this section is designed to introduce you to the very basic concepts of programming, explaining what you're doing when you're programming, without confusing you. If you are an experienced programmer in anything from BASIC to C++, you can skip this section.
Now, down to business. When you are coding, you will essentially be writing down a list of commands for the computer to execute. How you phrase the commands and how the computer executes them differs from language to language. In this case, we will be using Python. Python is an interpreted language. That means that if you want to run a Python program, you must have the interpreter - that's what you installed when you downloaded and installed Python. The interpreter is a program that reads and runs your program. It translates your code into something the computer can understand, as it goes along; this is called interpreting your program. Java is another example of a popular interpreted language. The other kind of language is a compiled language. A compiled language is coded exactly like a regular language, but running it is different: before you can run it, you compile the program. Your compiler takes the code you've written and turns it into something the computer can read all at once, and saves the result as an executable (.exe) file. This way, when you run the .exe file, the computer doesn't have to interpret your program, so it goes faster. Another bonus of a compiled program is that it can be run without an interpreter. An example of a compiled language is C++. Interpreted languages have their own advantages, though - they're generally easier to use, and errors can be solved more easily. Anyway, this is all a nice little piece of background knowledge, but it doesn't get you far in actual programming. Just keep in mind that all you're doing is making a list of commands for the computer to run and you'll be okay.
In programming, there are always variables, which are, like in math, named things which have a value. For example, in math, you might have the equation x + 6 = 0, so then if you solved it you'd find that the variable x had the value of -6. On the computer, you might have a variable count which started with a value of 0 and increased throughout the program. There are many types of variables, though. A regular whole number is usually called an int, which stands for integer. Depending on the programming language, numeric variables may be broken down further into ints, floats, longs, and others - but Python does everyone a favor and converts between all of them, so you don't have to worry about it. There are also strings, which usually contain a word or phrase, put in quotes (" ") to show that it is a string. As an example, you might have a string variable name which had a value of "Chris Davis". There are many more types of variables, but I won't go into those here.