ubuntu2004
Kernel: Python 3 (system-wide)
COSC 130 - Homework 04
Kyle Anderson
Problem 1: Dot Product
In [1]:
Out[1]:
The dot product of v1 and v2 is 16220
Problem 2: Amortization
In [2]:
In [3]:
Out[3]:
351 monthly payments of $850 would be required.
312 monthly payments of $900 would be required.
281 monthly payments of $950 would be required.
256 monthly payments of $1000 would be required.
236 monthly payments of $1050 would be required.
In [4]:
Out[4]:
308 monthly payments of $850 would be required.
279 monthly payments of $900 would be required.
255 monthly payments of $950 would be required.
235 monthly payments of $1000 would be required.
219 monthly payments of $1050 would be required.
Problem 3: Minimum
In [5]:
Out[5]:
4.1
3.4
Chicago
Problem 4: Argmin
In [6]:
Out[6]:
6
0
2
Problem 5: Finding Smallest Elements
In [7]:
In [8]:
Out[8]:
17
[17]
[17, 28]
[17, 28, 28, 39, 53]
[17, 28, 28, 39, 53, 54, 64, 74]
In [9]:
Out[9]:
[39, 74, 28, 64, 17, 28, 54, 53]
Problem 6: Find Unique Elements
In [10]:
In [11]:
Out[11]:
[12, 14, 16, 19, 23]
['bat', 'cat', 'dog', 'frog']
Problem 7: Frequency Distribution
In [12]:
In [13]:
In [14]:
Out[14]:
Unique Values: ['A', 'B', 'C', 'D', 'F']
Frequencies: [6]
Problem 8: Weighted Means
In [15]:
In [16]:
Out[16]:
Standard Mean: 4.9
Weighted Mean: 2.65
In [0]: