''' Homework 2
-- Due Sunday, Feb 7th at 11:59pm
-- Always write the final code yourself
-- Never use a library function that solves the problem
-- If you collaborated with a peer, mention them
-- Cite any websites you referenced
-- Use the PEP-8 checker for full style points:
https://pypi.python.org/pypi/pep8
'''
'''
In this homework, use list comprehensions wherever reasonable for full credit
'''
def string_distance(s1, s2):
'''Counts the number of positions at which two strings have different
characters. If the strings are of unequal length, you should count the
missing characters as disagreements. Do not count uppercase and
lowercase letters as different.
'''
pass
def substrings(s):
''' Returns a set of all the substrings of s
'''
pass
def common_chars(s, k):
''' Returns the set of characters that appear more than k times in
the input string, along with their number of occurrences.
'''
pass
def quicksort(lst):
'''Write a quicksort using python's list comprehensions.
Your function should not modify the original list,
but return a sorted list consisting of the same elements.
'''
pass
def free_letters(s1, s2):
''' Returns a sorted list containing all of the letters in s1 but not in s2.
(Each distinct letter should appear at most once, only letters will appear
in either string.)
'''
pass
def factors(n):
''' Returns the complete set of ordered pairs (a,b) where a * b = n
'''
pass
def int_to_ZF(n):
''' Return the set theoretic representation of the given positive integer.
(See definition at
https://en.wikipedia.org/wiki/Set-theoretic_definition_of_natural_numbers#Contemporary_standard)
Use frozensets, which correspond to mathematical sets.
'''
def ZF_to_int(fset):
''' Takes a set theoretic number and returns the equivalent integer.
'''
def main():
pass
if __name__ == "__main__":
main()