Learning Objectives:
Software Tools Needed: Web browser to access textbook and an IDE (on-line or on computer) with core Python 3.6+ loaded.
Lab Notes: Download the outline and focus questions to guide you while working through this lab. These are a useful tool for note taking and as well as studying for the quizzes and final exam.
For most of the programming we have done so far, we have focused on procedural (or imperative) programming that is built around the idea that programs are sequences of instructions to be executed. Object-oriented programming changes the focus to be on objects which incorporate both data and functions into a single unit. Classes are the ``templates'' that specify what is included in each object.
The CSCI 127 textbook has an excellent overview of writing and using classes. We started it in lecture, and for the lab, you should work through the 2 chapters:
In CSCI 127, we introduced the numpy and pandas library for numerical and data analysis. This section contains brief overviews of numpy and pandas, as well as two other popular libraries: plotly for visualizing data and scipy which is an open source Python library used for scientific computing and technical computing (and includes many other libraries such as numpy).
Work through the surveys of each:
For additional practice on core Python, see the HackerRank prepare series:
HackerRank: Prepare Python
Click the Easy
option on the right hand menu, and work through their Python challenges.
For more practice on using recursion and classes to solve problems, here are some popular ones from LeetCode: