In this project, I continued to practice object-oriented programming in Python.
I learned about class methods, static methods, class vs instance attributes, and
how to use the special __str__
and __repr__
methods.
- Python Scripts are written with Python 3.4.3
- C files are compiled using
gcc 4.8.4
- Tested on Ubuntu 14.04 LTS
Filename | Description |
---|---|
0-rectangle.py |
Empty class Rectangle that defines a rectangle |
1-rectangle.py |
Class Rectangle that defines a rectangle by its width and height |
2-rectangle.py |
Class Rectangle that has area and permiter methods |
3-rectangle.py |
Class Rectangle that counts with a string representation |
4-rectangle.py |
Class Rectangle that count with an official representation |
5-rectangle.py |
Class Rectangle that prints a message when an instance is deleted |
6-rectangle.py |
Class Rectangle with a public class attribute that counts the number of instances |
7-rectangle.py |
Class Rectangle with a public class attribute to print a specific symbol |
8-rectangle.py |
Class Rectangle with a method to compare instance's size |
9-rectangle.py |
Class Rectangle with a class method that returns a new instance |
101-nqueens.py |
Backtracking algorithm that solves the N-Queen puzzle |