Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kimfucious's full-sized avatar

Kim Ford kimfucious

  • Sheltering in place
View GitHub Profile
@kimfucious
kimfucious / lcm.py
Created August 4, 2018 15:15
Calculate LCM from multiple numbers
# I was helping my kid with his homework the other day.
# He's shown an interest in programming, so we wrote this together.
# Be sure to run this with python3, not python 2.
# 1. Get a list of numbers through user input, preventing non-integers and 0s as inputs
# 2. Create sets from each number factored out to the Nth, based on the largest number in the list
# 3. Get the intersection of the sets using and a little *args magic
# 4. Use min() on that intersection to determine the LCM.
def create_sets(nums):
@kimfucious
kimfucious / who_said_it.py
Last active July 11, 2018 11:51
Who said it? : A quote guessing game written in Python that scrapes a quote database to a local csv file
from bs4 import BeautifulSoup
from csv import reader, writer
from halo import Halo
from os import name, remove, system
from pyfiglet import figlet_format
from random import choice
from termcolor import colored
from time import sleep
import requests