Skip to content

Instantly share code, notes, and snippets.

View LizardLeliel's full-sized avatar

Evan Larose LizardLeliel

  • Halifax, Canada
View GitHub Profile
@LizardLeliel
LizardLeliel / RubixCube.py
Last active August 29, 2015 14:00
Rubix's Cube classes
import random
#Before the Saint Mary's competition, I've written two classes to use for creating a Rubix cube, to practice
#Objects in object-oriented languages.
#This was the basis of which I derived my Visual Basic Rubix Classes Module.
class Face:
def __init__(self, colour):
self.colour = colour
@LizardLeliel
LizardLeliel / A.py
Last active August 29, 2015 13:59
Dalhousie problem letter A
#This was problem A of the Dalhousie programming competiton. Of the four of five submissions I made, this was the only one that
#didn't suceed, and is also the most messiest and hardest to follow, but felt this showed some creative thinking
#The problem was that I had to figure out who won, based on how many problems the person solved, and if there's a tie, who did it in the shortest
#combined time of the problems.
#I would of had one line of input Which would be four numbers, representing the number of people in the competition,
#The number of problems there's going to be, what hour the competition started, and what minute the competition started.
#The second line is how many attempts to a problem there was from each person total
@LizardLeliel
LizardLeliel / E.py
Last active August 29, 2015 13:59
Dalhousie problem letter E
#This was Dalhousie University's 2014 programming competition problem letter E.
#We were suposed to have input as a text file, which were suposed to be mock examples of twitter posts. We had to output any
#line that contained a line that contained an expression like "3-4".
#This was meant to be done with Regular Expressions, but I have had no knowledge in those, so I had to do something unique and creative.
#I also did something I have never done before in programming - error trapping. Although very basic one and probably not the
#intended use for them, I have used them to solve my problem, with only having read what the try and except keywords did.
#My solution to go through every letter of every line, put each letter to a new string if it wasn't a number, and if it was a number,
@LizardLeliel
LizardLeliel / B.py
Last active August 29, 2015 13:59
Dalhousie problem letter B.
#This was Dalhousie Programming Competition 2014 programming problem letter B.
#I found that the 2d lists (Python doesn't have 2d arrays; they have things called lists, similar to arrays, but only one dimensional...
#you had to have lists in lists to have dimensionality) I've used while programming an older Sudoku program of mine to be helpful
#This Problem had a varying ammount of inputs. The first input was how many inputs was going to follow,
#While all lines after that were in the format "name ##". The ## was a number between 1 and 100, an represents
#The mark of each name. The names were useless, but I was suposed to make a histogram based on how many people
#Got Something in the tens digit. In other words...
@LizardLeliel
LizardLeliel / D.py
Last active August 29, 2015 13:59
Dalhousie Problem Letter D.
#This is from Dalhousie Univerisity's programming competition, problem letter D.
#It was the easist. There were 7 lines of input. I was suposed to print the average of the highest 6 values,
#with the output formatted to four decimal places.
#Due to its brevity, I haven't code commented it.
a = []
for each in range(7):