Python 2, Introduction
Printable Version (pdf)
Course Introduction
Python is a language with a simple syntax, and a powerful set of libraries. It is an interpreted language, with a rich programming environment, including a robust de bugger and profiler. While it is easy for beginners to learn, it is widely used in many scientific areas for data exploration. This course is an introduction to the Python programming language for s tudents without prior programming experience.
See Microsoft Imagine Academy for more details about the course and for added curriculum.
Prerequisite: Python 1, Introduction
Core Standards of the Course
Strand 1
Sequence Indexes
Standard 1
Students will be able to:
-
Understand how to work with Jupyter notebooks.
-
Understand an index and how it is used.
-
Understand how a string is indexed.
-
Work with string characters by index.
Standard 2
Students will be able to:
-
Slice strings into substrings.
Standard 3
Students will be able to:
-
Iterate through string characters.
Standard 4
Students will be able to:
-
Use string methods.
Performance Skills
- Work with string characters.
- Slice strings into substrings.
- Iterate through string characters.
- Use string methods.
Strand 2
Sequence Manipulation
Standard 1
Students will be able to:
-
Create lists.
-
Access items in a list.
Standard 2
Students will be able to:
-
Add items to the end of a list.
Standard 3
Students will be able to:
-
Modify and insert items into a list.
Standard 4
Students will be able to:
-
Delete items from a list by using del, .pop(), and .remove().
Performance Skills
- Create lists.
- Access items in a list.
- Add items to the end of a list.
- Insert items into a list.
- Delete items from a list.
Strand 3
Sequence Iteration
Standard 1
Students will be able to:
-
Iterate through Lists using for with in.
Standard 2
Students will be able to:
-
Use for range() in looping operations.
Standard 3
Students will be able to:
-
Use the list methods .extend(), +, .reverse(), and .sort().
Standard 4
Students will be able to:
-
Convert between lists and strings by using .split() and .join().
Performance Skills
- Iterate through lists using for and in.
- Use for count in range() In looping operations.
- Use the list methods .extend(), +, reverse(), and sort().
- Convert between lists and strings by using .split9) and .join().
- Cast strings to lists/direct multiple print outputs to a single line.
Strand 4
Working with Files
Standard 1
Students will be able to:
-
Import files into Jupyter notebooks by using the curl command.
-
Open and read local files in memory.
-
Use .read() to read a specific number of characters.
Standard 2
Students will be able to:
-
Use .readlines() to read text from files as a list of lines.
-
Use .close() to free system resources.
Standard 3
Students will be able to:
-
Use .readline() to read data from a file one line at a time.
-
Use .strip() to remove newline characters and other whitespaces.
Standard 4
Students will be able to:
-
Use .seek() to set file read and write locations.
-
Use file append mode.
Performance Skills
- Import files into Jupyter notebooks.
- Open and .read() local files in memory.
- Use .read() to read a specific number of characters.
- Use .readlines() to read data from file as a list of lines.
- Use .readline() to read data from file a line at a time.
- Use .strip() to remove newline characters.
- Use .write() to write data to a new local file.
- Use .seek() to set file read or write location.
- Use file append mode.
http://www.uen.org - in partnership with Utah State Board of Education
(USBE) and Utah System of Higher Education
(USHE). Send questions or comments to USBE
Specialist -
Kristina
Yamada
and see the CTE/Computer Science & Information Technology website. For
general questions about Utah's Core Standards contact the Director
-
THALEA
LONGHURST.
These materials have been produced by and for the teachers of the
State of Utah. Copies of these materials may be freely reproduced
for teacher and classroom use. When distributing these materials,
credit should be given to Utah State Board of Education. These
materials may not be published, in whole or part, or in any other
format, without the written permission of the Utah State Board of
Education, 250 East 500 South, PO Box 144200, Salt Lake City, Utah
84114-4200.