1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,170 +0,0 @@ |
1 |
-Hayden Walker 2019-2020 |
|
2 |
- |
|
3 |
-This is a portfolio of some of my favourite programs that I wrote during the summer of 2019 and onward. |
|
4 |
- *The programs are arranged alphabetically (By folder name, not by title) |
|
5 |
- |
|
6 |
-NOTE: The following dependencies are required in order to successfully run some of these programs. These dependencies are *not* included in the Python Standard Library. |
|
7 |
- *Matplotlib plotting library (for the Collatz Conjecture program) |
|
8 |
- *Pygame (for the aquarium program as well as Conway's Game of Life) |
|
9 |
- |
|
10 |
-Title (Date) [Dependencies] |
|
11 |
- *Skills |
|
12 |
- |
|
13 |
- Desc. |
|
14 |
-Aquarium (19 August 2019) [Requires Pygame] |
|
15 |
- *Pygame |
|
16 |
- *Importing sprites |
|
17 |
- *Random library |
|
18 |
- *Object-oriented programming |
|
19 |
- *Multiple instances of a class |
|
20 |
- *Each instance is unique and randomized |
|
21 |
- *Game loop |
|
22 |
- *Math operators |
|
23 |
- *Multiplication |
|
24 |
- *Conditionals |
|
25 |
- *Functions |
|
26 |
- *Methods |
|
27 |
- |
|
28 |
- A simple aquarium. A random number of fish are spawned, each being an instance of the Fish class. Each is randomly assigned one of four breeds, and each has a randomly assigned speed. The fish will change directions when they come in contact with the screen's edge. Furthermore, each 50 millisecond cycle, each fish has a 1% chance (for each axis) of changing direction on its own, regardless of its position. |
|
29 |
-Binary Search Algorithm (21 July 2020) |
|
30 |
- *Recursion |
|
31 |
- *Conditionals |
|
32 |
- *Exception handling |
|
33 |
- |
|
34 |
- A binary search algorithm. A sorted array of numbers is given along with a number to search for. The function |
|
35 |
-will return the position of the target number in the array, or None if it isn't there. Uses recursion. |
|
36 |
-Binary to Decimal Converter (18 August 2019) |
|
37 |
- *String slicing |
|
38 |
- *Reversing |
|
39 |
- *Concatenation |
|
40 |
- *Iterables |
|
41 |
- *Conditionals |
|
42 |
- *Math operators |
|
43 |
- *Powers |
|
44 |
- |
|
45 |
- A simple binary to decimal converter; will accept an arbitrtary amount of bytes of arbitrary lengths. |
|
46 |
-Caesar Cypher (25 July 2019) |
|
47 |
- *Iterables |
|
48 |
- *Conditionals |
|
49 |
- *For Loops |
|
50 |
- *List wrapping |
|
51 |
- *Functions |
|
52 |
- |
|
53 |
- Takes an encryption key (n) from 0-25 and moves each character ahead n spaces in the alphabet. If the letter reaches z, it wraps back to a. |
|
54 |
-Cash register (3 August 2019) |
|
55 |
- *Rounding |
|
56 |
- *While Loops |
|
57 |
- *Conditionals |
|
58 |
- *Functions |
|
59 |
- |
|
60 |
- Takes a sales total and amount tendered, then calculates change and lists the amount of each denomination of change to return. |
|
61 |
-Collatz Conjecture (7 August 2019) [Requires Matplotlib] |
|
62 |
- *A Classic Algorithm |
|
63 |
- *While Loops |
|
64 |
- *Conditionals |
|
65 |
- *Math operators |
|
66 |
- *Modulus |
|
67 |
- *Floor division |
|
68 |
- *Addition |
|
69 |
- *Matplotlib Graphing Library |
|
70 |
- |
|
71 |
- Takes a positive integer (n), and depending on its parity, will either divide it by 2 or multiply it by 3 then add 1, and repeat the whole process until the integer is equal to 1. It will then display a graph where x is the number of steps and y is the value of n. |
|
72 |
-Conway's Game of Life (22 August 2019) [Requires Pygame] |
|
73 |
- *A Cellular Automaton |
|
74 |
- *Random Library |
|
75 |
- *PyGame |
|
76 |
- *Rectangles |
|
77 |
- *Conditionals |
|
78 |
- *Iteration |
|
79 |
- *Object-Oriented Programming |
|
80 |
- *Functions |
|
81 |
- *Methods |
|
82 |
- *Game Loop |
|
83 |
- |
|
84 |
- Generates 100 squares that can each be either living or dead; each 1-second "generation," if a living square has less than two or more than three living neighbours, it will die from either underpopulation or crowding. If a dead square has exactly three living neighbours, it will become living, via reproduction. |
|
85 |
-Line/square drawing (27 July 2019) |
|
86 |
- *Tkinter GUI Library |
|
87 |
- *Canvas |
|
88 |
- *Buttons |
|
89 |
- *Inputs |
|
90 |
- *Random library |
|
91 |
- *Object-Oriented Programming |
|
92 |
- *For Loops |
|
93 |
- *Functions |
|
94 |
- *Methods |
|
95 |
- |
|
96 |
- A GUI application that takes a number (n) and, depending on which button is pressed, will generate either n lines or n rectangles, all of random size, position, and colour. It will display the last action completed in a status bar at the bottom. |
|
97 |
-Hangman (5 August 2019) |
|
98 |
- *Random Library |
|
99 |
- *Reading from a text file |
|
100 |
- *For Loops |
|
101 |
- *Game Loop |
|
102 |
- *Conditionals |
|
103 |
- *Iterables |
|
104 |
- *Functions |
|
105 |
- |
|
106 |
- A game of hangman that pulls words from a 100-word text file. |
|
107 |
-Insertion Sort (1 August 2020) |
|
108 |
- *Iteration |
|
109 |
- *Lists |
|
110 |
- *For loops |
|
111 |
- *Algorithms |
|
112 |
- |
|
113 |
- Basic insertion sort algorithm |
|
114 |
-Minefield/Minesweeper (20 July 2019) |
|
115 |
- *System commands |
|
116 |
- *Random Library |
|
117 |
- *Wrapping |
|
118 |
- *Iterables |
|
119 |
- *Conditionals |
|
120 |
- *Functions |
|
121 |
- *Game loop |
|
122 |
- |
|
123 |
- A game that draws a 5x5 grid, in which a random number of randomly placed mines are hidden. Goal: Clear the board without hitting a mine. |
|
124 |
-Pig Latin (19 July) |
|
125 |
- *String slicing |
|
126 |
- *String concatenation |
|
127 |
- *Conditionals |
|
128 |
- |
|
129 |
- Converts a word into "Pig Latin;" i.e. if the word begins with a vowel, it will add "ay" to the end, and if it begins with a consonant, it will move the first letter to the end of the word and then add "ay." |
|
130 |
-Recursive Guessing Game (24 August) |
|
131 |
- *Recursion |
|
132 |
- *Conditionals |
|
133 |
- *Math operators |
|
134 |
- *Floor division |
|
135 |
- *Addition |
|
136 |
- |
|
137 |
- The user chooses a number between 0 and 100 (unknown to the computer), and the computer will guess it. A light project that I included because of recursion. |
|
138 |
-Roman Numerals to Integer (19 January 2020) |
|
139 |
- *Dictionary data type |
|
140 |
- *Conditional |
|
141 |
- *For loop |
|
142 |
- *Continue |
|
143 |
- *Lists/using indexed |
|
144 |
- *Iteration |
|
145 |
- |
|
146 |
- The user inputs a number in Roman numerals and it is returned as an integer. |
|
147 |
-Monty Python's Python Soundboard (31 July) |
|
148 |
- *Tkinter GUI Library |
|
149 |
- *Buttons |
|
150 |
- *Lambda Expressions |
|
151 |
- *Object-Oriented Programming |
|
152 |
- *Playing audio files |
|
153 |
- |
|
154 |
- A just-for-fun soundboard of clips from Monty Python's Life of Brian. Fun Fact: The Python Programming Language is named after Monty Python! |
155 | 0 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,176 @@ |
1 |
+# Hayden's Python Portfolio |
|
2 |
+ |
|
3 |
+This is a portfolio of some of my favourite programs I've written in Python since the summer of 2019. |
|
4 |
+ |
|
5 |
+**Note: Collatz Conjecture requires the MatPlotLib library, and Conway's Game of Life and the aquarium require PyGame.** |
|
6 |
+ |
|
7 |
+*Programs will be listed with a date, a description, and the skills involved in making them.* |
|
8 |
+ |
|
9 |
+--- |
|
10 |
+ |
|
11 |
+## Aquarium (19 August 2019) *requires PyGame* |
|
12 |
+ |
|
13 |
+A simple aquarium. A random number of fish are spawned, each being an instance of the Fish class. Each is randomly assigned one of four breeds, and each has a randomly assigned speed. The fish will change directions when they come in contact with the screen's edge. Furthermore, each 50 millisecond cycle, each fish has a 1% chance (for each axis) of changing direction on its own, regardless of its position. |
|
14 |
+ |
|
15 |
+- Pygame |
|
16 |
+ - Importing sprites |
|
17 |
+- Random library |
|
18 |
+- Object-oriented programming |
|
19 |
+ - Multiple instances of a class |
|
20 |
+ - Each instance is unique and randomized |
|
21 |
+ |
|
22 |
+## Binary Search Algorithm (21 July 2020) |
|
23 |
+ |
|
24 |
+A binary search algorithm. A sorted array of numbers is given along with a number to search for. The function will return the position of the target number in the array, or None if it isn't there. Uses recursion. |
|
25 |
+ |
|
26 |
+- Recursion |
|
27 |
+- Conditionals |
|
28 |
+- Exception handling |
|
29 |
+ |
|
30 |
+## Binary to Decimal Converter (18 August 2019) |
|
31 |
+ |
|
32 |
+A simple binary to decimal converter; will accept an arbitrtary amount of bytes of arbitrary lengths. |
|
33 |
+ |
|
34 |
+- String slicing |
|
35 |
+ - Reversing |
|
36 |
+ - Concatenation |
|
37 |
+- Iterables |
|
38 |
+- Conditionals |
|
39 |
+- Math operators |
|
40 |
+ - Powers |
|
41 |
+ |
|
42 |
+## Caesar Cypher (25 July 2019) |
|
43 |
+ |
|
44 |
+Takes an encryption key (n) from 0-25 and moves each character ahead n spaces in the alphabet. If the letter reaches z, it wraps back to a. |
|
45 |
+ |
|
46 |
+- Iterables |
|
47 |
+- Conditionals |
|
48 |
+- For loops |
|
49 |
+- List wrapping |
|
50 |
+- Functions |
|
51 |
+ |
|
52 |
+## Cash register (3 August 2019) |
|
53 |
+ |
|
54 |
+Takes a sales total and amount tendered, then calculates change and lists the amount of each denomination of change to return. |
|
55 |
+ |
|
56 |
+- Rounding |
|
57 |
+- While Loops |
|
58 |
+- Conditionals |
|
59 |
+- Functions |
|
60 |
+ |
|
61 |
+## Collatz Conjecture (7 August 2019) *requires Matplotlib* |
|
62 |
+ |
|
63 |
+Takes a positive integer (n), and depending on its parity, will either divide it by 2 or multiply it by 3 then add 1, and repeat the whole process until the integer is equal to 1. It will then display a graph where x is the number of steps and y is the value of n. |
|
64 |
+ |
|
65 |
+- A Classic Algorithm |
|
66 |
+- While loops |
|
67 |
+- Conditionals |
|
68 |
+- Math operators |
|
69 |
+ - Modulus |
|
70 |
+ - Floor division |
|
71 |
+ - Addition |
|
72 |
+- Matplotlib Graphing Library |
|
73 |
+ |
|
74 |
+## Conway's Game of Life (22 August 2019) *requires Pygame* |
|
75 |
+ |
|
76 |
+Generates 100 squares that can each be either living or dead; each 1-second "generation," if a living square has less than two or more than three living neighbours, it will die from either underpopulation or crowding. If a dead square has exactly three living neighbours, it will become living, via reproduction. |
|
77 |
+ |
|
78 |
+- A cellular automaton |
|
79 |
+- Random library |
|
80 |
+- PyGame |
|
81 |
+ - Rectangles |
|
82 |
+- Conditionals |
|
83 |
+- Iteration |
|
84 |
+- Object-oriented programming |
|
85 |
+- Functions |
|
86 |
+- Methods |
|
87 |
+- Game loop |
|
88 |
+ |
|
89 |
+## Line/square drawing (27 July 2019) |
|
90 |
+ |
|
91 |
+A GUI application that takes a number (n) and, depending on which button is pressed, will generate either n lines or n rectangles, all of random size, position, and colour. It will display the last action completed in a status bar at the bottom. |
|
92 |
+ |
|
93 |
+- Tkinter GUI Library |
|
94 |
+ - Canvas |
|
95 |
+ - Buttons |
|
96 |
+ - Inputs |
|
97 |
+- Random library |
|
98 |
+- Object-Oriented Programming |
|
99 |
+- For Loops |
|
100 |
+- Functions |
|
101 |
+- Methods |
|
102 |
+ |
|
103 |
+## Hangman (5 August 2019) |
|
104 |
+ |
|
105 |
+A game of hangman that pulls words from a 100-word text file. |
|
106 |
+ |
|
107 |
+- Random library |
|
108 |
+- Reading from a text file |
|
109 |
+- For loops |
|
110 |
+- Game loop |
|
111 |
+- Conditionals |
|
112 |
+- Iterables |
|
113 |
+- Functions |
|
114 |
+ |
|
115 |
+## Insertion Sort (1 August 2020) |
|
116 |
+ |
|
117 |
+Basic insertion sort algorithm |
|
118 |
+ |
|
119 |
+- Iteration |
|
120 |
+- Lists |
|
121 |
+- For loops |
|
122 |
+- Algorithms |
|
123 |
+ |
|
124 |
+## Minefield/Minesweeper (20 July 2019) |
|
125 |
+ |
|
126 |
+A game that draws a 5x5 grid, in which a random number of randomly placed mines are hidden. The goal is to clear the board without hitting a mine. |
|
127 |
+ |
|
128 |
+- System commands |
|
129 |
+- Random library |
|
130 |
+- Wrapping |
|
131 |
+- Iterables |
|
132 |
+- Conditionals |
|
133 |
+- Functions |
|
134 |
+- Game loop |
|
135 |
+ |
|
136 |
+## Pig Latin (19 July) |
|
137 |
+ |
|
138 |
+Converts a word into "Pig Latin," i.e. if the word begins with a vowel, it will add "ay" to the end, and if it begins with a consonant, it will move the first letter to the end of the word and then add "ay." |
|
139 |
+ |
|
140 |
+- String slicing |
|
141 |
+- String concatenation |
|
142 |
+- Conditionals |
|
143 |
+ |
|
144 |
+## Recursive Guessing Game (24 August 2019) |
|
145 |
+ |
|
146 |
+The user chooses a number between 0 and 100 (unknown to the computer), and the computer will guess it. A light project that I included because of recursion. |
|
147 |
+ |
|
148 |
+- Recursion |
|
149 |
+- Conditionals |
|
150 |
+- Math operators |
|
151 |
+ - Floor division |
|
152 |
+ - Addition |
|
153 |
+ |
|
154 |
+## Roman Numerals to Integer (19 January 2020) |
|
155 |
+ |
|
156 |
+The user inputs a number in Roman numerals and it is returned as an integer. |
|
157 |
+ |
|
158 |
+- Dictionary data type |
|
159 |
+- Conditional |
|
160 |
+- For loop |
|
161 |
+ - Continue |
|
162 |
+- Lists/using indexes |
|
163 |
+- Iteration |
|
164 |
+ |
|
165 |
+## Monty Python's Python Soundboard (31 July 2019) |
|
166 |
+ |
|
167 |
+A just-for-fun soundboard of clips from Monty Python's Life of Brian. Fun Fact: The Python Programming Language is named after Monty Python! |
|
168 |
+ |
|
169 |
+- Tkinter GUI Library |
|
170 |
+ - Buttons |
|
171 |
+- Lambda Expressions |
|
172 |
+- Object-oriented programming |
|
173 |
+- Playing audio files |
|
174 |
+ |
|
175 |
+ |
|
176 |
+ |