This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
NewerOlder