COEN140 Lab 1 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (6 votes)

The purpose of this exercise is to get familiar with Python.
Get up and running with an Anaconda 2020.02 Python 3.7 installation on your personal
computer: https://www.anaconda.com/distribution/
Requirements:
1. Define a function that takes an argument n and returns a list of odd numbers from [0..n]
2. Define a function to read the provided CSV file.
a. Sort the list returned by the above function and return it. Hint: Use Python’s
list.sort() or sorted(list).
b. Bonus: Instead of sorting by the first element (names), sort by the second
element (ages). Google is your friend.
3. Define a function that counts the number of times all characters appear in a string and
returns the most frequent character. It should run in O(N). Hint: Use a dictionary.
4. Import a module (math, time, collections) of your choosing. Use a function from that
module in some way.
Useful resources on Python:
Google’s Python class
The SciPy Lecture Notes
Stanford Python Numpy Tutorial