Skip to content

sf-wdi-44/python-foundations-algo-practice

Repository files navigation

Python Foundations

Unit 1, Lesson 3


Materials We Provide

Topic Description Link
Lesson Two-part lesson, outlined below Part One, Part Two
Source Materials Original files used to create this lesson Here

This material may be challenging to get through if students are new to programming. Expect students to struggle with for loops and functions — you likely will have to do these exercises as a code-along. If time is left over, there is practice on the Coffee Preferences data set. If not, students can use it for more practice at home.


Learning Objectives

Part 1: Python Data Types

  • Discuss Python as a programming language.
  • Define integers, strings, tuples, lists, and dictionaries.
  • Demonstrate arithmetic operations and string operations.
  • Demonstrate variable assignment.

Part 2: Python Iteration, Control Flows, and Functions

  • Define Python control flow and conditional programming.
  • Implement for and while loops to iterate through data structures.
  • Apply if, else conditional statements.
  • Create functions to perform repetitive actions.
  • Demonstrate error handling using try, except statements.
  • Use Python control flow and functions to help us parse, clean, edit and analyze data sets.

Lesson Outline

Part 1 : Python Data Types (90 min)

  • Why Python? (5 min)
  • Introduction to Data Types (10 min)
  • Jupyter Notebook (5 min)
  • Python Variables (5 min)
  • Operators (10 min)
  • Integers and Floats (5 min)
  • Strings (10 min)
  • Lists (10 min)
  • Tuples (5 min)
  • Dictionaries (10 min)
  • Importing Packages and Documentation (5 min)
  • Practice With a Partner (10 min)

Part 2 : Python Iterations, Control Flow, and Functions (80 min)

  • If... Else Statements (10 min)
  • Iterating With For Loops (30 min — consider mostly doing as a code-along)
  • Functions (30 min — consider mostly doing as a code-along)
  • While Loops (10 min)
  • Practice control flow on Coffee Preference data set (if time remains, otherwise practice at home)
  • Conclusion

Student Requirements

Before this lesson(s), students should already be able to:

  • Recall and define common Python data types.

Additional Resources

For more information on this topic, check out the following resources:

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published