###############################################################################
# --------------------- 15-112 Recitation Week 4: Lists & Graphics --------------------- #

# This is a starter file of the problems we did in recitation. A good way to
# use this file is to try to re-write problems you saw in recitation from
# scratch. This way, you can test your understanding and ask on Piazza or
# office hours if you have questions :)

# --------------------------------------------------------------------------- #
###############################################################################
# Code Tracing
###############################################################################
import copy
def t3(a):
        (b, c) = (a, copy.copy(a))
        a[0] = 2
        b[0] = 3
        c[0] = 4
        print (a[0], b[0], c[0]),
        a = c
        a[0] = 5
        b[0] = 6
        c[0] = 7
        print (a[0], b[0], c[0]),        
a = [8, 9]
# t3(a) # uncomment me :)
# print (a[0]) # me too :)

###############################################################################
# Multiply Polynomials
###############################################################################
"""
Write the function multiplyPolynomials(p1, p2) which takes two polynomials 
defined as lists of numbers and returns a third polynomial which is the
product of the two.
For example, multiplyPolynomials([2,0,3], [4,5]) represents the problem
    (2x^2+ 3)(4x + 5)
and:
    (2x^2 + 3)(4x + 5) = 8x^3 + 10x^2 + 12x + 15
And so this returns [8, 10, 12, 15].
"""

def multiplyPolynomials(p1, p2):
    return [42]

def testMultiplyPolynomials():
    assert(multiplyPolynomials([2, 0, 3], [4, 5]) == [8, 10, 12, 15])
    assert(multiplyPolynomials([4, 5], [2, 0, 3]) == [8, 10, 12, 15])

###############################################################################
# Draw One Fancy Wheel
###############################################################################
"""
A fancy wheel is a polygon with n points, and each point is connected to each
other point. For example, a fancy wheel of size n = 4 would be a square with
an X through the center, but rotated 90 degrees so the points would be on 0, 90
180, and 270 degrees, respectively. (like a unit circle)

Write the function drawOneFancyWheel which takes in an integer number of points,
a canvas to draw on, and the width and height of the canvas, and draws a
fancy wheel with that many points. You may want to adapt the graphics functions
from here:
https://15112.vsecurity.info/notes/notes-graphics.html#emptyCanvas
"""
from tkinter import *

def drawOneFancyWheel(n, canvas, width, height):
    # draw fancy wheel here!
    pass
