Skip to content

Instantly share code, notes, and snippets.

View WilsonGramer's full-sized avatar

Wilson Gramer WilsonGramer

View GitHub Profile
@WilsonGramer
WilsonGramer / combine-strings-by-lines.swift
Last active July 10, 2018 16:09
Combines the input (multiline) strings by line, so that the first line of every string in the input is combined into the first line of the output, and so on.
//
// Combine Strings by Lines
// Wilson Gramer
// July 10, 2018
//
import Foundation
/// Combines the input (multiline) strings by line, so that the first line of every
/// string in the input is combined into the first line of the output, and so on.
Empty file
Empty file
@WilsonGramer
WilsonGramer / ExplicitFunction.py
Created December 19, 2017 21:08
ExplicitFunction created by wilsonator5000 - https://repl.it/@wilsonator5000/ExplicitFunction
# a_n = a_1 + (n - 1)d
# this function assumes that there is a constant slope!
# in the function used, the underscore ('_') defines the 'sub' value of a.
def explicitFormula(set, n):
print('The set is ' + str(set) + '.')
if len(set) > 1:
d = set[1] - set[0] # gets the slope.