""" Homework 1
-- Due Sunday, Sept. 6th 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
"""
def xor(x, y):
""" Return the exclusive-or of x and y """
pass
def int_or_float(n):
""" If n is (an instance of) the type int, return "int"
If n is a float, return "float"
Else, return "other".
"""
def palindrome(s):
""" Returns True if s is a palindrome.
Else returns False.
"""
def sum_under(li, k):
""" Finds the sum of all numbers in li strictly less than k """
pass
def fib_rec(n):
""" A recursive function that calculates the nth Fibonacci number.
For simplicity, call the "0th" Fibonacci number 0 (followed by 1 and 1).
"""
pass
def fib_iter(n):
""" An iterative function that calculates the nth Fibonacci number. """
pass
def tetrate(a, b):
""" Returns the bth tetration of a, where tetration is repeated
exponentiation. For example tetrate(3,4) = 3^(3^(3^3))
"""
def main():
pass
if __name__ == "__main__":
""" Runs main() if we run this file with 'python hw1.py'. """
main()