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
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
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.
Labels:
append,
for loops,
If,
if loop,
if statement,
list remove,
sort
Subscribe to:
Posts (Atom)