A deeper look at Python for intermediate or advanced coders in upper middle or high school. This course is tailored for students who have completed introductory visual programming courses on Tynker and want to advance to text programming in Python. Students will start with simple input-output statements and conditional logic, then progress to using more complex data structures to build algorithms. With hands-on coding practice, students learn to design, build, and debug programs – skills that any programmer needs to solve real-world problems. Students who successfully complete this lesson plan will demonstrate a strong mastery of Python syntax and functionality, as well as the ability to independently solve advanced coding problems.
- Python syntax
- Conditional logic
- Nested loops
- Simple loops
- Conditional loops
- Data types
- Turtle graphics
- Using arrays and objects to store structured data
* Online courses require a modern desktop computer, laptop computer, Chromebook, or Netbook with Internet access and a Chrome (29+), Firefox (30+), Safari (7+), or Edge (20+) browser. No downloads required.
Python 201 Lesson Plan
Lesson: Welcome to Python
Time: 40+ mins
Python prepares students for the rigors of AP Computer Science, quickly diving into the syntax and functionality of the Python language. We recommend Python for intermediate or advanced coders (grades 8+) who are comfortable with basic programming concepts and have completed at least one of our block-based coding courses. As a complement to Python Studio, which approaches Python as a tool to build games and solve visual puzzles, Python 201 takes a more traditional computer science approach. The course teaches Python from the ground up and shows students how they can apply advanced coding concepts to solve real-world problems.
Topics covered: Python syntax, variables, data types, math operators, boolean logic, Turtle graphics, branching, while loops, for loops, strings, lists, dictionaries, functions, classes, objects, and recursionWhat's Included:
- 15 scaffolded, self-guided lessons
- 15 lesson guides (one for each lesson) that will give you an overview of the vocabulary introduced in the lessons and suggestions for how to support your students through each lesson
- Answer keys for all activities
Answer Key Information:
The answer keys in Python 201 are a bit different than in other Tynker courses. To see solutions for each of the activities, log into your teacher account and access the preview for a lesson. You will see a button called "show solution" under each activity that your students need to enter code for. Click on the button to see the solution.
- print() : Displays the specified text.
- Python: Python is a programming language that is widely used in web development, game development, and scientific research. Python is known for being highly readable and uncluttered, using whitespace indentation instead of curly braces or keywords. Because the Python language is meant to be relatively syntactically simple, Python developers use the invented adjective “pythonic” to describe code that is highly readable and written in a way that shows fluency with Python idioms.
- Computer Science: Computer science is the study of computers and computation systems. Computers scientists mostly study and work with software and software systems, creating programs that accomplish different tasks.
- Instruction: An instruction is a single unit of work for a computer. Each instruction is read by a computer, translated into machine language, and executed.
- Value: A value is a single unit of information like literal text enclosed in quotations ("hello") or a number (42).
- Function: A function is a specific action that a computer knows how to perform. A function must be defined somewhere in the code and when a function is called, it will use the instructions that are stored in the function definition.
- Function Call: A function call is an instruction that tells the computer to perform a specific function. The function call must use the name of the function followed by a set of parentheses. A function call may or may not have a value inside the parentheses, depending on the function definition.
- Program/Code: A program is a sequence of instructions that a computer will execute. A program is sometimes referred to as code.
- Executing a program: When a computer executes a program, the computer is performing each instruction one at a time.
- Argument: An argument is the value that is inside the parentheses when a function call is made. For example, in the function call print(42), the argument is the value 42.
- Integer: In programming, an integer is a specific data type that stores a whole number. Just like an integer in math, in programming, an integer can be positive or negative.
- String: In programming, a string is a specific data type that stores a series of letters or characters. In other words, strings are groups of text. Strings must be enclosed in quotations.
- Syntax: Syntax is the set of rules that govern how a language is structured. All languages have a syntax. In English, sentences have a syntax that may involve subjects, verbs, and objects. Python syntax is a set of rules that define what correctly formatted code looks like. But if you write a sentence in English with incorrect syntax, someone still might understand what you’re saying. If you write a line of code in Python with incorrect syntax, your program won’t run!
- Syntax Error: An error in the syntax of your code
- Comment: Certain symbols in code communicate to the computer that anything after them should be ignored when it executes your program. This allows you to document your code by adding comments, which will help you debug your work and help other people understand what your code does. In Python, single line comments are started with a pound sign (#).
- Use Python instructions to display different values
- Combine multiple instructions to create short computer programs
- Document their code with comments to explain what they are doing
- Analyze the error messages that appear after executing code
- Fix syntax errors based on feedback from error messages
- Computers (1 per student) with student account access to Tynker.com
Warm-Up (5 minutes)
1. Ask students what they think of when they hear the phrase “text-based programming languages.”
2. Write their answers on the classroom board. Discuss.
3. Explain that Python is an example of a text-based programming language.
5. Say, “Today, we’re going to take a more traditional computer science approach as we explore Tynker’s Python 201 course. Let’s get started!”
Activities (35 minutes)
Facilitate as students complete the Welcome to Python modules on their own:1. Introduction (Document)
- Students will read a short introduction that explains the Python 201 course.
- Tell students to click the orange “Next” button (located at the bottom) to move to the next module.
- This module introduces students to outputs.
- Tell students to click the orange “play” button to instruct their computer to perform the given instruction.
- Are students struggling to print their name? Give a hint: Tell them to use the code listed above as a reference.
- This module introduces students to functions and function calls.
- Check that students are clicking the orange “play” buttons to instruct their computer to perform the given instruction.
- Ask students, “What’s a program? What’s another name for it?” (A sequence of instructions is called a program, and is sometimes referred to as code)
- Are students struggling to print the name of their favorite author, artist, and historical figure on separate lines? Give a hint: Tell them to use the code in the "Multiple Instructions" section as a reference.
- This module introduces students to arguments.
- Ask students, “What are function calls?” (An instruction that tells the computer to perform a known action with some value)
- Are students are struggling with the two puzzles? Give a hint: Tell them to use the code in the examples as a reference.
- Students will read a short document that introduces syntax.
- In this module, students will need to apply syntax knowledge to fix the syntax errors in the “Function Call” section. Additionally, students will need to fix the syntax errors in the “Syntax Errors” puzzle.
- In this DIY (do-it-yourself) module, students will learn about comments and create their own artwork by printing characters.
- Check that students are adding comments to their program.
- This module also includes a DIY Character Art project, where students are instructed to create artwork using printing characters. If students finish early, ask them to show their artwork to a neighbor.
- Students will be asked 3 quiz questions to review concepts from this lesson.
- Quiz questions involve printing the name of a country, identifying the correct definitions of a “value,” and printing a 3 x 3 cube of asterisk ( * ) characters.
Discussion Questions/Follow-Up Activities (20 minutes)
- Create a class K-W-L chart, which tracks what the class knows (K), wants to know (W), and has learned (L) about programming. Ask students what they know about coding and programmers, and write their responses in the “K” column of the chart. Next, ask students what they want to know, and write their responses in the “W” column of the chart. Add to the “L” column of the chart after each Tynker lesson.
- CCSS-ELA: SL.8.1, RI.9-10.3, RI.9-10.6, RI.11-12.3, RI.11-12.6, L.9-10.3, L.9-10.6, L.11-12.3, L.11-12.6
- CCSS-Math: HSN.Q.A.2, HSN.Q.A.3, MP.1, MP.2
- CSTA: 2-AP-13, 2-AP-16, 2-AP-17, 2-AP-19, 3A-AP-17, 3B-AP-11
- CS CA: 6-8.AP.13, 6-8.AP.16, 6-8.AP.17, 6-8.AP.19, 9-12.AP.12, 9-12.AP.16
- ISTE: 1.c, 1.d, 4.d, 5.c, 5.d, 6.b
U.K. StandardsKey stage 3:
Pupils should be taught to:
- design, use and evaluate computational abstractions that model the state and behaviour of real-world problems and physical systems
- understand several key algorithms that reflect computational thinking [for example, ones for sorting and searching]; use logical reasoning to compare the utility of alternative algorithms for the same problem
- create, reuse, revise and repurpose digital artefacts for a given audience, with attention to trustworthiness, design and usability
- understand a range of ways to use technology safely, respectfully, responsibly and securely, including protecting their online identity and privacy; recognise inappropriate content, contact and conduct, and know how to report concerns
Key stage 4:
All pupils must have the opportunity to study aspects of information technology and computer science at sufficient depth to allow them to progress to higher levels of study or to a professional career.
Pupils should be taught to:
- develop their capability, creativity, and knowledge in computer science, digital media, and information technology
- develop and apply their analytic, problem-solving, design, and computational thinking skills
- understand how changes in technology affect safety, including new ways to protect their online privacy and identity, and how to report a range of concerns