$30
Lab 1
The purpose of this exercise is to get familiar with Python.
Get up and running with an Anaconda Python 3.9 installation on your personal computer:
https://www.anaconda.com/products/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