Professional Documents
Culture Documents
Introduction to Python
Unit 1 Module 1
Introduction to Python
Unit 1 Module 1
Table of Contents
Module 1 Outline.............................................................................................................................3
1.1: Getting Started with Python in Jupyter Notebooks..................................................................5
1.2: Types and Variables.................................................................................................................6
1.3: Type() Function........................................................................................................................7
1.4: Addition and Errors..................................................................................................................8
1.5: ASCII Art.................................................................................................................................9
1.6: Input........................................................................................................................................10
1.7: Print Formatting......................................................................................................................11
1.8: Quote Display and Boolean....................................................................................................12
1.9: String Formatting and the 'in' Keyword..................................................................................13
Module 1 Labs...............................................................................................................................14
Module 1 Project............................................................................................................................14
2
Introduction to Python
Unit 1 Module 1
Module 1 Outline
Section Title Topics
#
1.1 Getting Started with Python in Jupyter 1.1.1 Using Jupyter Notebooks
Notebooks 1.1.2 Hello World!
1.1.3 Comments
1.1.4 Notebooks and Libraries
1.1.5 Altering Notebook Structure
Quiz 1.1
3
Introduction to Python
Unit 1 Module 1
Using Commas
Quiz 1.7
1.9 String Formatting and the 'in' keyword 1.9.1 String Format Methods
1.9.2 Input Formatting
1.9.3 Boolean 'in' Keyword
Quiz 1.9
4
Introduction to Python
Unit 1 Module 1
5
Introduction to Python
Unit 1 Module 1
Objectives00
Notebook-led content
Open the Unit1_Mod1_1.1 Practice File and complete the following sections. Take notes as needed.
1.1.3 Comments #
6
Introduction to Python
Unit 1 Module 1
Section question
“Why is programming so important to our information driven age?”
7
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.2 Practice File and complete the following sections. Take notes as needed.
1.2.1 What is a the characters which are enclosed in single or double quotes
String?
8
Introduction to Python
Unit 1 Module 1
1.2.4 Data Types the datatype tells the interpreter what type of the data to be
expected
Section questions
3 things you learned from the lesson
2 things you found most interesting
1 question you still have
9
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.3 Practice File and complete the following sections. Take notes as needed.
Section Notes
Topic
10
Introduction to Python
Unit 1 Module 1
11
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.4 Practice File and complete the following sections. Take notes as needed.
1.4.3 Errors!
12
Introduction to Python
Unit 1 Module 1
Section questions
What kinds of errors can programs have?
Have you identified a bug or error in a program or game that you use?
13
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.5 Practice File and complete the following sections. Take notes as needed.
Section Notes
Topics
Section questions
Write a paragraph (4-5 sentences) on how you feel about programming based on the sections 1.1-1.5 of this
unit.
14
Introduction to Python
Unit 1 Module 1
15
Introduction to Python
Unit 1 Module 1
1.6: Input
Objectives
Notebook-led content
Open the Unit1_Mod1_1.6 Practice File and complete the following sections. Take notes as needed.
16
Introduction to Python
Unit 1 Module 1
17
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.7 Practice File and complete the following sections. Take notes as needed.
18
Introduction to Python
Unit 1 Module 1
Class activity
Create a simple quiz on string formatting and then have a partner take the quiz.
19
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.8 Practice File and complete the following sections. Take notes as needed.
20
Introduction to Python
Unit 1 Module 1
21
Introduction to Python
Unit 1 Module 1
Objectives
Notebook-led content
Open the Unit1_Mod1_1.9 Practice File and complete the following sections. Take notes as needed.
22
Introduction to Python
Unit 1 Module 1
Class activity
Create a simple quiz on string formatting and then have a partner take the quiz.
23
Introduction to Python
Unit 1 Module 1
Module 1 Labs
In this lab, you will practice the skills taught in sections 1.1 through 1.5 of Module 1, specifically:
Use Python 3 in Jupyter notebooks.
Write working code using print() and # comments.
Write working code using type() and variables.
Combine strings using string addition (+).
Add numbers in code (+).
Troubleshoot errors.
Create character art.
Lab Instructions
1. Open the Unit1_Mod01_Practice1a file from the cloned notebook library.
2. Follow the instructions to complete the tasks as directed in the practice file.
In this lab, you will practice the skills taught in sections 1.6 through 1.9 of Module 1, specifically:
Gather, store, and use string input.
Format print() output.
Test string characteristics.
24
Introduction to Python
Unit 1 Module 1
Lab Instructions
1. Open the Unit1_Mod01_Practice1b file from the cloned notebook library.
2. Follow the instructions to complete the tasks as directed in the practice file.
Module 1 Project
Instructions
1. Open the Unit1_Mod01_Project1 file from the cloned notebook library.
25