Skip to content

Instantly share code, notes, and snippets.

@sadmicrowave
sadmicrowave / FirstFactorial.py
Created November 1, 2018 20:38
Challenge: 11.1.2018 - First Factorial
#!/usr/local/bin/python3
# ---------------------------------- MODULE IMPORTS ---------------------------------------- #
import sys, cProfile
from functools import reduce
# --------------------------------- CHALLENGE CONTEXT -------------------------------------- #
# Using the Python language, have the function FirstFactorial(num) take the num parameter being
# passed and return the factorial of it (e.g. if num = 4, return (4 * 3 * 2 * 1)). For the test
# cases, the range will be between 1 and 18 and the input will always be an integer.
@sadmicrowave
sadmicrowave / main.py
Last active October 26, 2018 03:09
Challenge: 10.25.2018 - Longest Word
#!/usr/local/bin/python3
import re, cProfile
# --------------------------------- CHALLENGE CONTEXT -------------------------------------- #
# Have the function LongestWord(sen) take the sen parameter being passed and return the
# largest word in the string. If there are two or more words that are the same length,
# return the first word from the string with that length. Ignore punctuation and assume
# sen will not be empty.
@sadmicrowave
sadmicrowave / coffee.py
Created March 22, 2018 15:00
A fun Virtual Barista for brewing coffee
import abc, time, sys, itertools
class Container (object):
__meta__ = abc.ABCMeta
level = None
original_level = None
@abc.abstractmethod