1.1 Karel Commands
Lessons:
A logic error is a mistake in the algorithm or program that causes it to behave incorrectly or unexpectedly.
A syntax error is a mistake in the program where the rules of the programming language are not followed.
The following are effective ways to find and correct errors: test-cases; hand-tracing; visualizations; debuggers; adding extra output statement.
1.6 Decomposition
1.7 Commenting Your Code
Lessons:
A code segment refers to a collection of program statements that are part of a program.
A program can be described broadly by what it does or in more detail by both what the program does and how the program statements accomplish this function.
Comments are a form of program documentation written into the program to be read by people and do not impact how a program runs.
1.8 Abstraction
Lessons:
Program documentation is a written description of the function of a code segment, event, procedure, or program and how it was developed.
Abstraction is the process of reducing complexity by focusing on the main idea. By hiding details irrelevant to the question at hand and bringing together related and useful details, abstraction reduces complexity and allows one to focus on the idea.
Procedural abstraction allows a solution to a large problem to be based on the solution of smaller sub-problems. This is accomplished by creating procedures to solve each one of the sub-problems.
A procedural abstraction may extract shared features to generalize functionality instead of duplicating code. This allows for program code reuse, which helps to manage complexity.
1.9 Super Karel
What we did:
Write programs that use SuperKarel instead of Karel
Utilize the new toolbox of commands that SuperKarel provides over Karel
Read the documentation to understand how to use an API
1.10 For Loops
1.12 To If
Lessons:
Selection determines which parts of an algorithm are executed based on a condition being true or false.
Nested conditional statements or “else if” statements consist of conditional statements within conditional statements.
1.13 While Loops
Create your UltraKarel Image 8/29
Lessons:
Creative development can be an essential process for creating computational artifacts.
Computing enables people to use creative development processes to create computational artifacts for creative expression or to solve a problem.
Multiple levels of abstraction are used to write programs or create other computational artifacts.
Algorithms are precise sequences of instructions for processes that can be executed by a computer and are implemented using programming languages.
Programs can be developed for creative expression, to satisfy personal curiosity, to create new knowledge, or to solve problems (to help people, organizations, or society).
Programming is facilitated by appropriate abstractions.
Current Events 9/26
My Random Number Game 10/4
Using the Python3 Sandbox in CodeHS follow the linked instructions to create the game.
Your task is to remix this game to make it yours.
Makecode Activity 10/25
In this activity I coded a Hot or Cold game with a seeker and a hider. When the signal strength between the two microbits was low, it displayed a tiny heart on the seeker's screen. The stronger the signal got, the bigger the heart grew on their screen, signifying that they were getting closer. This was a fun 2 player game to make.
Functions Review Quiz 10/25
The quiz helped me review what we learned about functions and how they are created and used. I got an 100%.
Functions and Parameters Activities
In this program I wrote a function that takes a height in feet and inches and converts it to meters.
For example, if you are 6 feet, 4 inches tall, then calling
convert_height_to_meters(6, 4)
through the input questions I wrote should result in 1.9304 meters.
In this program I wrote a function that computes the area of a triangle given its base and height.
The formula for an area of a triangle is:
AREA = 1/2 * BASE * HEIGHT
For example, if the base was 5 and the height was 4, the area would be 10.
triangle_area(5, 4); # should print 10
I collected the parameters through input questions.
Functions and Returns Activities
In this exercise, I wrote a function named square to compute the square of a number. Squaring a number means multiplying it by itself. My function took one parameter and return the squared value. I then stored the value returned by the function and called into a variable.
For example, the following code should put the value 25 in x.
x = square(5)
In this exercise, I wrote a function named quadruple to compute the quadruple of a number. The quadruple of a number is itself times four. My function took one parameter and returned the quadrupled value. I stored the value returned by the function call into a variable.
Functions and Parameters 2
I wrote a function called is_even that takes one parameter and returns a boolean value. It should return True if the argument is even; it should return False otherwise.
The is_even function should not print anything out or return a number. It should only take in a number and return a boolean.
I wrote a program that asks the user for integers and prints whether the number they entered is even or odd using your is_even function. The user can keep entering numbers until they enter the SENTINEL value, 0.
I wrote a function called minVal that returns the minimum of the two numbers values passed in as parameters.
For example, if you made a call like
x = minVal(10, 14)
x should have the value 10.
I would like to tell a story about Jujutsu Kaisen inside of codehs.
In my story, Gojo, a young, powerful sorcerer with the rare "Six Eyes" ability, gets attacked by Toji, an assassin with extreme skills and is known as the "Sorcerer Killer." Gojo and his friend Geto are tasked with protecting a girl named Riko, but Toji is hired to take all of them down. The fight between Gojo and Toji forces Gojo to learn Reverse Cursed Technique and his most powerful move, Hollow Purple, in order to kill Toji and save his friends.
Scene 1:
The two strongest sorcerers, Gojo and Geto, are walking with Riko, the girl they were hired to protect.
They think that everything is going well.
Scene 2:
Toji stabs Gojo, almost killing him. Geto and Riko run away from the fight.
Scene 3:
Gojo learns Reverse Cursed Technique, and uses it to stay alive.
Scene 4-7:
Gojo uses his new technique, Hollow Purple, in order to kill Toji and save his friends.
Other people like my script and scene ideas.
What is a Create Task?
Create Task:
• Written in Python on replit or use Processing
• Game, application, data analysis, or mathematical simulation.
In the Create performance task, you will design and implement a program that might solve a problem, enable innovation, explore personal interests, or express creativity. Your submission must include the elements listed in the Submission Requirements section below.
Practice Performance Tasks
Practice Performance Task 1(INDEPENDENT)
Students need to break the idea down, identifying several components:
(1) Function w/ a parameter
Algorithm
Sequencing
Selection: If/Else, If, If/Else…Elif
Iteration: For Loop, While Loop
Students will submit their final link from their sandbox creation
Practice Performance Task 2(INDEPENDENT)
Students are to brainstorm their first performance task idea, for their AP Exam
Students need to break the concept down, identifying several components:
(1) Function w/ a parameter
(1) Function w/o a parameter
Algorithm
Sequencing
Selection: If/Else, If, If/Else…Elif
Iteration: For Loop, While Loop
Written Response set 1
Simulator Task - 2/3/25
Simulations
Simulations use math and physics to build a realistic model of how different bridge designs behave under pressure. We can then run several simulations using different designs to test and refine bridge designs without ever spending the time and money on building physical structures.
Class Activity
In this activity, you’ll work with a partner to formulate, test, and refine a hypothesis about bridge building. This simulation is useful because it allows us to rapidly test our hypotheses about bridge designs without the constraints of the real world.
Punnett Square Generator
Create Performance Task
The user will choose the range of numbers they want to guess from, and they'll be given a random amount of guesses to find the number chosen in the range by the computer.
I use a list to store the range of numbers the computer is able to choose from, based off of the user's choices.
My program uses abstraction and three functions to break down the game into different parts.
My program has three functions that all have different purposes. Two of them have parameters to make the function work.
My program has if/elif statements, while loops, for loops, and random choice to help with sequencing, selection, and iteration.
Ap Comp Sci Rap
Instructions:
Your task is to create a(n) account using your Drew e-mail address.
You are then going to create a song/ rap of your choice, starting with a beat.
You are then going to rap or sing about what you’ve learned this school year via AP Computer Science.