Docsity

CodeHS, Lecture notes of Computer Science

Toggle sidebar
bg1
CodeHS
Intro to Programming in Python with Arduino Syllabus
1 year for High School (175 contact hours)
Course Overview and Goals
The Intro to Programming in Python with Arduino course merges the Introduction to Computer Science in Python
and the Introduction to Physical Computing with Arduino courses. The Python course will provide the
prerequisite information needed before students apply programming concepts to their physical Arduino device.
Learning Environment: The course utilizes a blended classroom approach. The content is fully web-based, with
students writing and running code in the browser. Teachers utilize tools and resources provided by CodeHS to
leverage time in the classroom and give focused 1-on-1 attention to students. Each unit of the course is broken
down into lessons. Lessons consist of video tutorials, short quizzes, example programs to explore, and written
programming exercises, adding up to over 100 hours of hands-on programming practice in total. Each unit ends
with a comprehensive unit test that assesses a student's mastery of the material from that unit.
Programming Environment: Students write and run Python programs in the browser using the CodeHS editor.
For the Arduino content, students write and run programs in the browser using the Tinkercad simulator and will
download their programs to their Arduino devices using Arduino software for further testing.
More information: Browse the content of this course at https://codehs.com/course/9651
Prerequisites: The Intro to Programming in Python with Arduino course is designed for complete beginners with
no previous background in computer science. The course is highly visual, dynamic, and interactive, making it
engaging for new coders.
Course Breakdown
Unit 1: Intro to Programming with Turtle Graphics (6 weeks/30 hours)
Browse the full content of this unit at https://codehs.com/library/course/9651/module/14576
Objectives / Topics
Covered
●What is a Command?
●Moving Tracy
●Tracy’s Coordinate System
●For Loops
●Functions and Parameters
●Top Down Design
●Variables
●User Input
●If/else Statements
●While Loops
Example Assignments
/ Labs
●34 exercises total
●Example exercises:
○Row of Circles
■In this program, Tracy should draw a row of circles across the
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download CodeHS and more Lecture notes Computer Science in PDF only on Docsity!

CodeHS

Intro to Programming in Python with Arduino Syllabus

1 year for High School (175 contact hours)

Course Overview and Goals

The Intro to Programming in Python with Arduino course merges the Introduction to Computer Science in Python and the Introduction to Physical Computing with Arduino courses. The Python course will provide the prerequisite information needed before students apply programming concepts to their physical Arduino device. Learning Environment: The course utilizes a blended classroom approach. The content is fully web-based, with students writing and running code in the browser. Teachers utilize tools and resources provided by CodeHS to leverage time in the classroom and give focused 1-on-1 attention to students. Each unit of the course is broken down into lessons. Lessons consist of video tutorials, short quizzes, example programs to explore, and written programming exercises, adding up to over 100 hours of hands-on programming practice in total. Each unit ends with a comprehensive unit test that assesses a student's mastery of the material from that unit. Programming Environment: Students write and run Python programs in the browser using the CodeHS editor. For the Arduino content, students write and run programs in the browser using the Tinkercad simulator and will download their programs to their Arduino devices using Arduino software for further testing. More information: Browse the content of this course at https://codehs.com/course/ Prerequisites: The Intro to Programming in Python with Arduino course is designed for complete beginners with no previous background in computer science. The course is highly visual, dynamic, and interactive, making it engaging for new coders.

Course Breakdown

Unit 1: Intro to Programming with Turtle Graphics (6 weeks/30 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● What is a Command? ● Moving Tracy ● Tracy’s Coordinate System ● For Loops ● Functions and Parameters ● Top Down Design ● Variables ● User Input ● If/else Statements ● While Loops Example Assignments / Labs ● 34 exercises total ● Example exercises: ○ Row of Circles ■ In this program, Tracy should draw a row of circles across the

width of the canvas using a for loop. ○ Circle Pyramid ■ Write a program that directs Tracy to draw a pyramid with 3 circles on the bottom row, 2 in the middle, and 1 on top. ○ Bubble Wrap 2. ■ In this program, you should have Tracy add highlights to each bubble from our Bubble Wrap example program. Use top down design to break this large problem into smaller pieces! ○ Rating ■ Write a program that shows a graphical representation of a user’s rating value. If the value is between 1 and 4, draw a red X. If it is between 5 and 7, draw a yellow horizontal line. If it is an 8 or above, draw a green checkmark. Unit 2: Basic Python and Console Interaction (3 weeks/15 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Printing ● Variables ● Types ● User Input ● Converting Input Types ● Arithmetic Expressions ● String Operators ● Comments ● Graphics in Python Example Assignments / Labs ● 18 exercises in total ● Example exercises: ○ Printing ■ Print messages to the console ○ Variables ■ Create variables of different types, and print them to the console. ○ Types ■ Investigate the types of different variables ■ Convert between types ○ Arithmetic Expressions & Converting Input Types ■ Age in One Year - Ask the user how old they are, and tell them how old they will be in one year ■ Rectangle, part 1 - Make variables for length and width and compute area and perimeter ■ Rectangle, part 2 - Ask the user for length and width and compute area and perimeter Unit 3: Intro to Arduino (1-2 weeks/5-10 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Intro to physical computing ● Goal Setting ● Comments ● Pseudocode

and number of servings, and report the total amount of each ingredient needed Unit 5: Looping (2 weeks/10 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● While Loops ● For Loops ● Break and Continue ● Nested Control Structures Example Assignments / Labs ● 11 exercises total ● Example exercises: ○ While Loops ■ Divisibility - Ask the user to enter a numerator and denominator, and re-prompt until the denominator is non-zero ○ For Loops ■ Average test score - Compute the average of several test scores ○ Break and Continue ■ Higher/ Lower - Ask the user to guess a particular number between 1 and 100. If the user’s guess was too high or too low, they should be notified ○ Nested Control Structures ■ Rolling Dice - Print out all combinations that can be made when 2 dice are rolled Unit 6: Functions and Exceptions (3 weeks/15 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Functions ● Namespaces ● Parameters ● Return Values ● Exceptions Example Assignments / Labs ● 16 exercises total ● Example exercises: ○ Functions ■ Raining cats and dogs - Write functions to print text art of a cat and a dog ■ Temperature converter - write functions to convert from Fahrenheit to Celsius and vise versa ○ Exceptions ■ Temperature converter, part 2 - Add exception handling to your temperature conversion program ○ Putting it all together ■ Enter a positive number - Make a function to repeatedly ask the user to enter a number until they enter a positive number

Unit 7: Program Control with Arduino (2-3 weeks/10-15 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● For loops ● While loops ● Variables ● If statements ● If/else statements ● Using buttons ● Using motors ● Operators (arithmetic, comparison, and logical) ● Using sensors (ultrasonic range finder, light sensor, temperature sensor) ● Functions and parameters Example Assignments / Labs ● 5 explorations ● 10 exercises in total ● Example exercises: ○ Blinking Based on Potentiometer ■ Blink an LED at a speed based on the value of the potentiometer. If the potentiometer reads a value below 500, blink the LED on and off for a quarter second each. If the potentiometer reads a value above 500, blink the LED on and off for a half second each. ○ Servo Sweep with Reset ■ Slowly increase the position of the servo (increasing by 1 degree every 100ms is a good speed) until it reaches 180 degrees. If at any point Button A is pressed, set the servo back to 0 for 1 full second and then start the process over again. ○ Distance Warning Lights ■ No LEDs should be lit if an object is detected 15cm or farther from the ultrasonic range finder. If an object is detected closer than 15 cm, light only a green LED. If an object is detected closer than 10 cm, light only a yellow LED. If an object is detected closer than 5 cm, light only a red LED. Unit 8: Strings (3 weeks/15 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Indexing and Slicing ● Math Operators on Strings ● For Loops Over a String ● String Methods Example Assignments / Labs ● 14 exercises in total ● Example exercises: ○ Indexing ■ First character - write a function that takes a string and returns the first character ■ All but the first character - write a function that takes a string and returns everything but the first character

● Equivalence vs. identity Example Assignments / Labs ● 13 exercises in total ● Example exercises: ○ Dictionaries ■ Phone book - user repeatedly enters name, and program either asks for the person’s phone number or reports the phone number already provided ○ 2d lists ■ Checkerboard - write a program that prints the initial setup of a checkerboard, with a 1 where a piece would be and a 0 where a blank square would be Unit 11: Project: Guess the Word (3 weeks/15 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Allow students to combine a variety of topics (strings, loops, booleans, user input, etc.) in a single program ● Introduce students to incremental development ● Strengthen debugging skills by having students develop a larger project ● Testing Example Assignments / Labs ● Part 1 - store a secret word in a variable, ask the user for a guess, and report whether or not it is correct ● Part 2 - refine fetching guesses to check for invalid guesses and repeatedly ask until guess is valid ● Part 3 - allow the user to guess 10 times, and print a combination of dashes and correct guesses before each guess ● Part 4 - only penalize the user for incorrect guesses Unit 12: Advanced Arduino (4-7 weeks/20-35 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Challenges ● Explore a new sensor ● Build a step-by-step project ● Final project Example Assignments / Labs ● Example exercises: ○ Explore a new sensor ■ Research a sensor we have not studied in this course and explore how it is used. In a group, develop and present a lesson to teach your peers about your chosen sensor, including exercises where they can practice using the sensor for themselves. ○ Build a step-by-step project ■ Find a ready-made project online. Follow the steps to recreate the project using your Arduino and any needed materials. ■ Create an updated set of directions complete with pictures and tips from your experience. ○ Final project

■ Use your Arduino to bring an idea to life using sensors and external components. ■ Present your project to peers, administration, and family! Unit 13: Final (.5 weeks/2-3 hours) Browse the full content of this unit at https://codehs.com/library/course/9651/module/ Objectives / Topics Covered ● Students will be tested on all topics included in the course ● Multiple choice, fill-in-the-blank, short answer, and coding questions included Example Assignments / Labs ● Part 1- Multiple Choice: Can be taken online or on paper (Paper version found in resources ● Parts 2, 3 & 4- Fill-in-the-blank, short answer, coding: Paper versions available in resources