Summer Python Language 编程9-10年级
Teacher
:Yuejie Wang
Class Introduction
:Course Outline
This is an 8-week long course focusing on the fundamentals
of programming through Python. Lessons will be 1.5 hours each and will touch on
common programming topics such as data abstractions, managing complexity, and object-oriented
programming. This course if focused at students at the high school level and is
relatively fast paced.
Teacher:
I am a sophomore studying Electrical Engineering and Computer Sciences at UC Berkeley, with a focus on computer science. I have taught computer science for a semester at Berkeley and have previously taught and mentored computer science for high schoolers.
Lessons
1.
What is programming + first guided program
(vending machine)
a.
Before class
i.
Help installing Python
b.
What is programming
i.
Use cases
ii.
Programming limitations
c.
Fundamentals
i.
Data abstractions
ii.
Assignment statements pt. 1
iii.
Python general syntax
iv.
Functions
v.
Libraries pt. 1 (what are they?)
vi.
Errors
vii.
Debugging
d.
Program
i.
Create a vending machine using functional
programming by filling in skeleton code.
ii.
(Optional) sum digits
2.
Elements of programs + Creating functions
a.
Elements
i.
Primitive expressions
ii.
Compound expressions + importance of readability
iii.
Call expressions
iv.
Libraries pt. 2 (importing)
v.
Assignment statements pt. 2
vi.
Nested expression evaluation order
vii.
Pure/nonpure functions
b.
Functions
i.
Functions are abstractions
ii.
Syntax
iii.
Local names + naming conventions
iv.
What are infix operations
c.
Program
i.
Create an absolute value function (skeleton)
ii.
Largest two squares function
iii.
(Optional) Hailstone sequence
3.
Programming Lab + buffer
a.
Wears jacket function
b.
What would python display (20 Questions)
c.
Falling factorial
d.
Double Eights
4.
Refresher on functions + how to design functions
+ control + buffer problems
a.
Guidelines on functions
i.
Separation of concerns
ii.
Do not Repeat Yourself (DRY)
iii.
Documentation
iv.
Default arguments
b.
Control
i.
Statements
ii.
Compound statements
iii.
Conditional Statements
iv.
Booleans
v.
Iteration (for, while)
5.
Data types (Python)
a.
Data Types
i.
Int, float, complex
ii.
Floats and rational numbers
iii.
Pairs
iv.
Lists
v.
Strings
vi.
Dictionaries
b.
Programming
i.
Skip add (sum every odd list element)
ii.
Greatest Common Denominator
iii.
Enumerate
iv.
(Optional) Squares only
6.
Object Oriented Programming
a.
Object Oriented Programming
i.
Why OOP?
ii.
Classes vs. Objects
iii.
Methods
iv.
Syntax
v.
Attributes
vi.
Inheritance
b.
Programming
i.
Rewrite vending machine
ii.
Card Game
7.
Object Oriented Programming Buffer Lab
8.
Overview of Advanced Topics
a.
Advanced Topics
&