Tag Archives: variables

Variable Types in Python

Table of Contents for this Page Common Variable types Python’s built in [crayon-6766e6cc62640491074503-i/] function Naming Conventions for Variables (snake vs camel case) Python supports the basic types of variables that  you would expect from a general purpose language. These are listed below. Number floating point  integer String (more here) Boolean List (more on lists here) Dictionary Tuple Example … Continue reading Variable Types in Python →

Variables in Python 3 – Part 2: Text

Introduction Lets continue with the idea of a video game that we introduced in the first part of this article. Imagine your player has a name. This could be hard coded, but what if the player gets to pick the name, in which case it is dynamic. This would be a case where a text … Continue reading Variables in Python 3 – Part 2: Text →

Variables in Python 3 – Part 1: Numbers

Introduction Imagine you’re programming a video game. You have a cute little monster character on the screen who can run left or right. Inside your program, you keep track of where the character is standing, using a number. Smaller numbers are more to the left, larger numbers are more to the right: How will your … Continue reading Variables in Python 3 – Part 1: Numbers →