Boot-camp: week-03

Overview:

Welcome to week-3 of the DSAN bootcamp!!! This week we will be covering the following topics

  • Algorithmic Programming: Pseudocode, Thinking Like a Programmer

  • Control Statements: Boolean and Comparative Statements

  • Control Flow: if/else Statements, for/while Loops, Graceful Exiting

  • Functions: Namespace and Scope, Arguments and Return Values

  • I/O Handling: Reading and Writing Files

By the end of this module, you will be capable of answering the following questions (give them a try!):

Note: Answering the questions is NOT required, however, the questions are designed to look like sample interview questions and will test your knowledge of the materials in this module.

  • Compare and contrast for loops and while loops. Give 2-3 use cases (examples) for each.
  • What are prohibited variable names in Python? Why are they prohibited?
  • Write a useful Python function that uses a for loop and a while loop to accomplish a data cleaning task.

Lecture

An html version of the lecture notebook can be found at the following link (view lecture html).

The best way to digest this information is to download the .ipynb file and work through it yourself in Jupyter or VS code. While doing so, make sure that you understand the code entirely.

In some sense, “Understanding the code” means you can correctly predict the output of each line without actually having to run it.

Lecture video

While not required to watch, a video walkthrough of the lecture notebook highlighting important aspects of the lesson has been provided below.

VIDEO PLAYBACK SPEED: To speed up, or slow down the video, right click the video, select show all controls, click the three vertical dots on the left, and select the desired playback speed.

Assignment

Once you have “digested” the lesson, you will be able to do the assignment (view assignment html).

When you are done email the completed assignment to your designated TA using the zip file format specified in the document.

Use the following naming convention for the file: FIRSTNAME_LASTNAME_ASSIGNMENT3.zip

  • For example, If your name was Jane Doe, then the zipped folder should be called JANE_DOE_ASSIGNMENT3.zip

References

Disclaimer: This document is not an original work. It contains content from many sources and is for educational purposes only.

Sources: