l1p1.py 479 Bytes
Newer Older
Thomas Torsney-Weir's avatar
Thomas Torsney-Weir committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26

##############
# Question 1 #
##############
# Define sort function
def sort_list(l):
  pass

##############
# Question 2 #
##############
# Given a random number and a random digit, design an algorithm to place the 
# digit so that the number is divisible by 3
def div7(n, i):
  pass 

##############
# Question 3 #
##############
# Extend the cubic function y = a_1 x^3 + a_2 x^2 + a_3 x + a_4 to handle a 
# multi-variate input
def cubic(x, A):
  import numpy as np
  pass