Python is a fast, flexible, beginner-friendly programming language. It’s gradual learning curve and readability make it an excellent choice for launching your adventures in coding. Python is also amazingly powerful. NASA, Google and Disney, to name a few, use it for everything from web applications to robots. Take a byte of Python and quickly learn to think like a programmer with our free videos and tutorials.
Program or be programmed? That is the question. There are numerous, excellent sources that will teach you how to code following tried and true methods. We’re taking a completely different approach in this introduction to Python programming. Rather…
continue reading →You are about to embark upon an adventure. Python is an ideal starting point for your expedition into computer science. It might be the first, and last, programming language you need to learn. The journey of a thousand miles begins with a single step…
continue reading →Entering commands at the prompt is just the beginning. Let’s use IDLE to save and run files. With this skill you’ll be able to write and build complex and powerful Python programs. IDLE has two modes: interactive and script. We wrote our first…
continue reading →Not only is math essential to programming, it’s also fascinating. Especially when you have a super-powerful calculator like Python to do the heavy-lifting for you. In this tutorial you will learn how to use Python operators to perform basic…
continue reading →Operator precedence determines the order in which operations are processed. In this tutorial, you will perform a mathemagical trick using nested parentheses to control Python operator precedence. If you’re just joining us, you may want to start with…
continue reading →Think of a number. Any number. Now, before you forget that number, let’s store it for later. When you think of a number, you are holding that value in your head. If you want to remember it later and your memory is like mine, you write it down on a…
continue reading →Open your kitchen cupboard. In it you will find various means of storing food. Cardboard boxes, Ziplocs, Tupperware, plastic bags sealed with twist ties, and the focus of our discussion, storage jars. Computer memory is like a cupboard filled with…
continue reading →“Hello, World!” Do you remember our first program? We used the print() function to output a line of text. The phrase “Hello, World!” is a string, and a string is a sequence of characters. We create a string by wrapping a sequence of characters in…
continue reading →Did the excitement of the print() function wear off? There’s a lot more to strings than simply printing them out in IDLE. In this tutorial we will cover Python string operations: concatenation, multiplication, indexing and slicing. If you’re just…
continue reading →There are several built-in methods that allow us to easily make modifications to strings in Python. In this tutorial we will cover the .upper(), .lower(), .count(), .find(), .replace() and str() methods. But first, let’s take a look at the len…
continue reading →Life is like a Python list. You spend most of it in boxes. Sometimes the box is empty and sometimes the box is filled with different objects. And sometimes it’s a box within a box. I like to think of Python lists as boxes because the brackets look…
continue reading →Lists and strings have a lot in common. They are both sequences and, like pythons, they get longer as you feed them. Like a string, we can concatenate and multiply a Python list. Python List Concatenation & Multiplication Old MacDonald had a farm, E…
continue reading →Life is full of amazing opportunities. You can explore forests, climb mountains, run with wolves. Or you could learn Python. What do you do when you’re overwhelmed with choices? Creating a Python list and using Python list methods will help you…
continue reading →Functions are like little machines in your program. You put something in the machine, press the start button, it works its magic and spits something out. Python functions are incredibly useful. They allow us to reuse code and simplify our programs…
continue reading →Python’s built-in functions are incredibly useful. Eventually you will find yourself repeating yourself. That’s bad. That’s when programming gets boring. Fortunately, you can write your own functions, which is why the first three letters of function…
continue reading →The Python interpreter reads a program just like you are reading this page: one line at a time, from left to right and top to bottom. The interpreter executes operations and functions in the order that it encounters them. This is called control flow…
continue reading →True or False? You use some combination of these opposite pairs everyday: Yes. No. Up. Down. Left. Right. Forward. Back. On. Off. If your answer is True, then you’re already a computer scientist! Why stay inside learning Boolean logic? You can stop…
continue reading →When I was a young whippersnapper, I didn’t get dessert unless I finished my dinner. Dinner always consisted of healthy stuff like spinach so it was very hard to finish. That was my introduction to conditional statements. Conditional statements are…
continue reading →Did you ever play Snakes & Ladders? We had the tame version in America, Chutes and Ladders. It was supposed to teach you morals. But let’s use it to illustrate our next concept: Python elif statements. The elif statement is a portmanteau of else and…
continue reading →Did you play Red Light/Green Light growing up? I did. I still play it, though it’s hard to find adults willing to join me. If you live outside the United States you probably played a version called Statues. But what does this have to do with Python…
continue reading →While loops are useful when we want to maintain a state until a certain condition is met or until some external event occurs. But they can also get out of hand. Programming is like a circus: you gotta keep the lions in the ring. Or pythons in the…
continue reading →I’m guessing you’re learning Python because you want to write interactive programs, like video games. Well, today is your lucky day. You’re going to program your first Python game. Your First Python Game: Rock, Paper, Scissors Open IDLE and create a…
continue reading →You know what’s not fun? Doing the same thing over and over again. You know what is fun? Telling a computer to do it for you! That’s when you need a for loop. What’s Iteration? while loops are useful when you need something to run until a condition…
continue reading →Whether or not you like to press wildflowers, Python modules make coding much easier. If you were building a house, you wouldn’t start by making your own hammer, saw and measuring tape, unless, of course, you were a crazy DIY lumberjack. Instead, you…
continue reading →