Friday, February 13, 2015

Character Creator Program

The following program is a simple character creator found in many RPG games. The user can assign point values to attributes from a pool of points. The user can also subtract values from attributes and put those points back in a pool.




Hangman Game

The following program is a simple hangman game. It utilizes lists and tuples.




Wednesday, February 11, 2015

Using Dictionarys

The following program shows you how to use dictionarys. In the example below you can see how to add terms, delete terms, redefine terms.




Nested Sequences

The following program demonstrates a nested sequence. The items in a list are made up of tuples. The program also demonstrates how to unpack a tuple. See program below:



Tuesday, February 10, 2015

More With Lists

 The following program demonstrates manipulations with a list. In this example you can see how to add a score and remove a score from the list. The list can also be sorted.

What is the difference between a tuple and a list? The main difference between a tuple and list is that a list is mutable and a tuple is immutable. Since tuples are immutable they can be stored in a way that makes them faster than using lists.

More with Lists