AP Computer Science Principles — Course Home¶
★ This course is designed to prepare students to take the AP Computer Science Principles Exam and the PCEP-30-02 Certification Exam ★ Excerpts from the course overview were taken from AP College Board and the Python Institute.
AP Computer Science Principles Course Overview¶
AP Computer Science Principles introduces students to the breadth of the field of computer science. In this course, students learn to design and evaluate solutions and to apply computer science to solve problems through the development of algorithms and programs. Students incorporate abstraction into programs and use data to discover new knowledge. Students also explain how computing innovations and computing systems, including the internet, work, explore their potential impacts, and contribute to a computing culture that is collaborative and ethical. This section of the course uses the Python programming language.
The following big ideas serve as the foundation of the course:
Big Idea |
Description |
|---|---|
Creative Development |
Developing computing innovations uses a formal, iterative design process or a less rigid process of experimentation, with phases of investigating, reflecting, designing, prototyping, and testing. |
Data |
Data are central to computing innovations because they communicate initial conditions to programs and represent new knowledge. |
Algorithms and Programming |
Programmers integrate algorithms and abstraction to create programs for creative purposes and to solve problems. |
Computing Systems and Networks |
Computer systems and networks are used to transfer data. |
Impact of Computing |
Computers and computing have revolutionized our lives. To use computing safely and responsibly, we need to be aware of privacy, security, and ethical issues. |
For this course we will use various Integrated Development Environments (IDEs) to manage programs, data files, and images. VS Code is our primary online IDE. For personal development and collaboration, online IDEs allow peer collaboration. Students using a personal laptop may install VS Code as a desktop IDE.
PCEP-30-02 — Course Goals¶
This course also prepares students to sit for the PCEP — Certified Entry-Level Python Programmer Certification Exam (PCEP-30-02), offered by the Python Institute. The exam consists of 30 questions (single-select, multiple-select, and drag-and-drop) in 40 minutes, requiring a cumulative average score of at least 70% across all exam blocks. Students who master the Python fundamentals in this course are well positioned to earn this industry-recognized credential before beginning their AP Create Performance Task work.
PCEP-30-02 Exam Block Alignment¶
PCEP-30-02 Exam Block |
Weight |
AP CSP Connection |
|---|---|---|
Block 1: Computer Programming and Python Fundamentals — terms & definitions, Python’s logic/structure, literals, variables, numeral systems, operators, data types, console I/O |
18% |
Algorithms and Programming (Big Idea 3); foundational syntax needed before any Create PT code is written |
Block 2: Control Flow — Conditional Blocks and Loops — the |
29% |
Algorithms and Programming (Big Idea 3); directly supports Computational Thinking Practice 2 (Algorithms and Program Development) |
Block 3: Data Collections — Tuples, Dictionaries, Lists, and Strings |
25% |
Data (Big Idea 2); students must show a “list or file of data” and use it meaningfully in their Create PT program |
Block 4: Functions and Exceptions — decomposition, parameters, return values, scope, recursion, |
28% |
Algorithms and Programming (Big Idea 3) and Code Analysis (Computational Thinking Practice 4); functions are how students demonstrate abstraction in their Create PT |
The Connection Between PCEP and AP CSP¶
These two credentials are not competing goals — they reinforce each other on the same timeline:
PCEP certifies syntax fluency. AP CSP certifies computational thinking. A student cannot design an algorithm, use abstraction, or explain their own code for the Create PT written responses without first being fluent in the language mechanics that PCEP tests.
The Create Performance Task requires evidence of a list, abstraction (a student-developed procedure with parameters), and an algorithm with a logical/mathematical operator affecting a decision. All three of those requirements map directly onto PCEP Blocks 2–4 (control flow, data collections, and functions).
Studying for PCEP builds the Personalized Project Reference habit early. Explaining why a block of code works — not just that it works — is tested on both the PCEP exam (in scenario-based items) and the AP CSP written responses.
Sequencing matters. This course intentionally front-loads PCEP content (August–November) so that by the time students begin formal Create PT development in December, they are drawing on certified, fluent Python skills rather than learning syntax and computational thinking simultaneously.
Syllabus¶
Expectations¶
==Be on time for class.== Students should be seated, logged into Canvas, the course website, and their notebook within the first five minutes to avoid being marked tardy or absent.
==Be prepared for class.== Have your notebook, assignments, pen/pencil, and paper ready every day.
==Have a good attitude about learning.== Be prepared to actively participate. Accept feedback with a positive attitude.
==Be respectful of others and their property.==
==Take care of the learning environment.== Keep your area neat and clean. Always clean your space before leaving. Put materials away in their proper place.
==Report any damaged equipment== to the instructor immediately.
Do not change any settings on the computers.
Do not download or install any programs (including games) on school computers.
Do not access inappropriate content on the internet.
Academic Honesty Policy¶
==Be in charge of your own learning.== All submitted work — every line of code — must originate from your own mind.
Students may work with a peer and discuss general problem-solving strategies, ideas, and algorithms. However, all code must be your own. Every line of code must originate from your own thinking.
If you use external sources (websites, LLM/AI tools, friends), cite them in your code comments — indicate where you got help and whether any code sections came from that source. AI tools may be used for idea generation, debugging assistance, and understanding small parts of code — not to generate complete solutions.
Team/group assignments must include every team member’s name in the block header comment. All other assignments require individual submission — work cannot be a copy of a peer’s submission. A submitted file bearing another student’s name but not your own will be treated as cheating and subject to the district’s plagiarism/cheating policy.
The Create Performance Task is individually authored. You may discuss ideas and approaches with classmates, but the program code, video, and written responses submitted to the College Board must be entirely your own. Collaboration must be disclosed in your Personalized Project Reference.
Electronic Devices¶
During instruction, assessment, classwork, discussions, and group collaboration, all personal electronic devices must be placed in a secure location where they will not be a distraction. Smartphones, tablets, and personal devices are not permitted without explicit instructor permission. Phones must be silenced or powered off.
No Meta smart glasses, AR glasses, or AI-enabled wearable devices are permitted in the classroom at any time. These devices can capture audio and video without visible indication, which violates the privacy of other students and the integrity of assessments.
CAMS provides Windows Laptops for student use. Personal Laptops are a privilege on our campus, not a right. Parent(s)/guardian(s) will be notified and conferences will be held if a student persists in using laptops for non-academic purposes.
Earphones, headphones, or other listening tools (excluding medically approved listening devices) should not be used during instruction or collaboration time.
Notes / Notebook¶
Each student is responsible for taking, organizing, and maintaining hand-written unit notes (Purpose of Note-Taking). Notes must be hand-written using the Cornell Notes method. Formatted Cornell Notes documents will be provided for each unit subsection. Additional pages will be provided as needed. Students are encouraged to keep their notebooks up-to-date and organized.
📒 Notes may be used on unit tests — current unit only. Notes count for 5% of your final grade.
Academic Support¶
Before school — 7:30 am – 8:30 am (please contact me prior to the date you need assistance — I may be meeting with another student or in a meeting)
After school — Tuesday – Thursday: 3:45 pm – 4:15 pm
Peer Tutoring — Monday through Friday, before and after school
Weighted Grading¶
Grades are posted online using Canvas. Grades are weighted and assigned as detailed below. Each item is scaled on a point system.
Grading Category |
Percentage |
|---|---|
Projects (IDP, Unit Capstone, Create PT) |
50% |
Tests / Quizzes |
30% |
Classwork / Portfolio |
15% |
Notes (hand-written Cornell Notes — current unit usable on tests) |
5% |
Grading Scale¶
All projects, presentations, tests, quizzes, classwork, portfolio, and notes will be used to calculate your final grade.
Grade Letter |
Percentage |
|---|---|
A |
90% – 100% |
B |
80% – 89% |
C |
70% – 79% |
D |
60% – 69% |
F |
50% – 59% |
M (Missing) |
45% |
Students who score below 75% on a project, test, or quiz (excluding finals) may retake for up to 75%. Students have one week to review feedback and schedule a retake before or after school.
Classroom Attendance, Conduct, and Participation¶
It is crucial that students consistently attend class. Most classes consist of hands-on coding activities, pair programming, and projects that cannot be replicated outside of class time. Consistent attendance directly affects understanding and overall performance.
⚠️ Note on Participation: Participation is a critical component of learning. While it cannot be recorded as a formal grade per district policy, attendance, conduct, and active engagement are tracked and reflected in overall classroom standing.
Conduct Tracking (Additive Scale)¶
Infractions (Tardies, Sleeping, Gaming, Doing Other Classes’ Work) |
Rating |
|---|---|
0–5 |
Excellent (E) |
6–10 |
Satisfactory (S) |
11–15 |
Needs Improvement (N) |
16+ |
Unsatisfactory (U) |
Make-Up & Late Work Policy¶
📌 Planned Absences: If a student will not be present on the day an assignment is due, they must contact the teacher at least 2 days before the absence(s). Failure to notify the instructor in advance does not exempt a student from the assignment or late work penalty.
Students are responsible for all makeup work when absent. Refer to the district policy regarding makeup work timelines.
To make up a quiz or test, it is the student’s responsibility to contact the instructor within two school days of returning to set an agreed-upon date and time. Makeups and retakes are done before or after school only.
Handouts will be placed in a makeup folder labeled with the student’s name. It is the student’s responsibility to check this folder when returning before consulting the instructor.
Late work submitted after the due date without prior notification will receive a maximum score of 3/5. Work more than one week late will receive a maximum of 1/5. Projects follow their own rubric timelines.
Assignment Header & Submission Requirements¶
Required Docstring Header¶
All submitted .py files and test case documents must include the following module docstring. This mirrors the block comment required in Java and follows the standard used by university CS departments.
⚠️ Submissions missing the header will be penalized one point.
"""
Name: [Your Full Name]
Partner: [Partner's Full Name, or "None"]
Course: AP Computer Science Principles
Instructor: [Instructor Name]
Assignment: [Assignment Number — Assignment Title]
Due Date: [Month Day, Year]
"""
Example:
"""
Name: Jordan Smith
Partner: Alex Rivera
Course: AP Computer Science Principles
Instructor: [Instructor Name]
Assignment: 1.3.1 — Calculate Your Weight on Jupiter
Due Date: September 12, 2026
"""
Submission Requirements¶
All assignments require the following unless otherwise stated:
All
.pysource file(s)Test Cases document showing: inputs, expected output, actual output, and Pass/Fail result — with the assignment header at the top
Projects will have their own dedicated rubric and submission instructions posted on Canvas.
5-Point Assignment Rubric¶
Points |
Grade |
Execution & Output |
Documentation & Style |
Submission |
|---|---|---|---|---|
5 |
Full Credit |
Program runs without errors or warnings. Output matches expected results for all test cases. |
Docstring header fully completed. Meaningful variable names, |
All required |
4 |
Near Full Credit |
Program runs. Output is correct for most test cases with one minor error or omission. |
Docstring header complete. Comments mostly present. Minor style or formatting inconsistency. |
All required files submitted. Assignment header present. |
3 |
Partial Credit |
Program runs but produces incorrect output for some test cases, or raises non-fatal warnings. |
Limited comments. Docstring header partially completed. Variable names or formatting inconsistent. |
Most required files submitted. Test cases incomplete or partially documented. |
2 |
Minimal Credit |
Program has syntax or logic errors that cause significant incorrect output, or fails to run. |
Little to no commenting. Docstring header missing or blank. Poor variable naming or formatting. |
A required |
1 |
Attempted |
Code submitted shows a clear attempt but does not run. |
Minimal or no documentation present. |
At least one file submitted, but submission is largely incomplete. |
0 |
No Credit |
Nothing submitted, file is empty, or code is unrelated to the assignment. |
N/A |
N/A |
Note-Taking in Learning¶
==Do you have the PowerPoint, video, textbook, and website — do you still need to take notes?==
Despite the vast amount of information available in electronic formats, taking notes is an important learning strategy. By considering your note-taking strategies carefully, you will be able to create notes that help you retain the most important concepts and assist in exam preparation.
Two Purposes for Taking Notes¶
External storage — keeping a record of information heard or read.
Facilitating learning — actively processing and organizing content while studying.
The availability of information online may reduce the importance of external storage. However, by neglecting to take notes, ==you lose the benefits of note-taking as a learning tool==.
How Note-Taking Supports Learning¶
Taking notes during class supports your learning in several important ways:
Helps you focus attention and avoid distractions.
Engages your mind in identifying and organizing main ideas — active learning rather than passive listening.
Creates a condensed, well-organized record that is more efficient to review than re-reading longer texts.
Note-Taking Methods¶
Method |
Description |
When to Use |
|---|---|---|
Lists |
Sequential listing of ideas as presented. May be short phrases or full paragraphs. |
Fallback method; tends to require a lot of writing and makes prioritization difficult. |
Outlines |
Most important ideas along the left margin (Roman numerals), supporting ideas indented (letters). |
When material is well-organized. Easy to use on a laptop. |
Concept Maps |
Central idea in the center; branches for new ideas; arrows to connect concepts. |
When showing relationships among ideas; good for instructors who move between topics. |
Cornell Method ✓ Required |
Two-column approach: narrow cue column (left 1/3), notes column (right 2/3), summary footer. |
Recommended by most universities. Works for all subject types. Excellent for exam review. |
The Cornell Method¶
The Cornell method was developed in the 1950s by Professor Walter Pauk at Cornell University. It is recommended by most universities for its usefulness and flexibility.
Four components:
Component |
Description |
|---|---|
Header |
Course name and date at the top of each page. |
Notes column (right, 2/3 of page) |
Capture notes during class using any method — lists, outlines, or diagrams. |
Cue column (left, 1/3 of page) |
Main ideas, keywords, and questions — filled in during and after class. |
Summary (footer) |
A 2–3 sentence summary of the class in your own words — written after class. |
“I used to tape my lecture classes so I could fill in my sketchy notes afterwards. Now that I’m using the Cornell system, my notes are complete and organized in much less time.” — A student at Southern Methodist University
==Reviewing your notes as soon as possible after class is the most important step in making note-taking work.==
General Tips on Note-Taking¶
Be prepared — have your materials (notebook, pens) ready before class.
Write on only one side of the paper to allow integration with reading notes.
Label, number, and date all notes at the top of each page.
Don’t try to capture everything — listen for big ideas, keywords, and instructor emphasis cues.
Copy anything written on the board — it is likely to be important.
Leave space between ideas so you can add detail later.
Use abbreviations — be consistent so you can decode them when reviewing.
Create a symbol to mark when you fall behind (return and fill in with help from a peer or the instructor).
==Review your notes the same day — this is the single most effective habit for retention.==
Write a summary of the main ideas in your own words after each class.
What If You Miss Class?
Never ask: “Did I miss anything important?”
If notes or slides are posted online — take notes on them.
Borrow a classmate’s notes — photocopy them, then annotate with your own questions and connections. Do not just copy and insert.
Schedule a study session with the classmate who provided notes.
If no notes are available, use the syllabus to identify what was covered and write a short summary using course readings and reliable sources.
Python Style Guidelines¶
Consistent, readable code is a professional standard and a grading requirement in this course. All submitted code must follow PEP 8, the official Python style guide, as applied below.
Naming Conventions¶
Element |
Convention |
Example |
|---|---|---|
Variables |
|
|
Functions |
|
|
Classes |
|
|
Constants |
|
|
Parameters |
|
|
Modules / files |
|
|
Formatting Rules¶
Indentation: 4 spaces (not tabs) per level — never mix tabs and spaces.
Line length: Keep lines under 79 characters (PEP 8 standard).
Blank lines: Two blank lines before and after top-level function and class definitions. One blank line between methods inside a class.
Whitespace: One space after commas; spaces around operators (
x = a + b, notx=a+b); no space directly inside parentheses or brackets.Variable names: Descriptive and meaningful — never single letters (
x,a,n) except for loop counters (i,j) or well-established math variables.
Example: Well-Styled Code¶
"""
Name: Jordan Smith
Partner: None
Course: AP Computer Science Principles
Instructor: [Instructor Name]
Assignment: 1.3.1 — Calculate Your Weight on Jupiter
Due Date: September 12, 2026
"""
def weight_on_jupiter(earth_weight):
"""Calculate a person's weight on Jupiter given their Earth weight.
Parameters:
earth_weight (float): weight in pounds on Earth
Returns:
float: equivalent weight in pounds on Jupiter
"""
# Jupiter's gravity is 2.34 times Earth's gravity
jupiter_gravity_multiplier = 2.34
jupiter_weight = earth_weight * jupiter_gravity_multiplier
return jupiter_weight
def main():
earth_weight = 150.0
jupiter_weight = weight_on_jupiter(earth_weight)
print(f"Weight on Jupiter: {jupiter_weight} lbs")
if __name__ == "__main__":
main()
AP Computer Science Principles Computational Thinking Practices: Skills¶
Practice 1: Computational Solution Design |
|
|---|---|
1.A |
Investigate the situation, context, or task. |
1.B |
Determine and design an appropriate method or approach to achieve the purpose. |
1.C |
Explain how collaboration affects the development of a solution. |
1.D |
Evaluate solution options. |
Practice 2: Algorithms and Program Development |
|
|---|---|
2.A |
Represent algorithmic processes without using a programming language. |
2.B |
Implement and apply an algorithm. |
Practice 3: Abstraction in Program Development |
|
|---|---|
3.A |
Generalize data sources through variables. |
3.B |
Use abstraction to manage complexity in a program. |
3.C |
Explain how abstraction manages complexity. |
Practice 4: Code Analysis |
|
|---|---|
4.A |
Explain how a code segment or program functions. |
4.B |
Determine the result of code segments. |
4.C |
Identify and correct errors in algorithms and programs, including error discovery through testing. |
Practice 5: Computing Innovations |
|
|---|---|
5.A–5.C |
Investigate a computing innovation’s function, data use, and beneficial/harmful effects. Assessed through reading-passage multiple-choice questions on the end-of-course exam — not directly scored on the Create PT. |
Practice 6: Responsible Computing |
|
|---|---|
6.A–6.C |
Contribute to an inclusive, safe, collaborative, and ethical computing culture. Not directly tested on the multiple-choice section or scored as a standalone free response — reflected in Create PT collaboration disclosure and crediting of borrowed code or media in the Personalized Project Reference. |
Units & Topics¶
📅 Timeline Goal (This Course Segment): Python fundamentals and PCEP-30-02 preparation, August 17 – December 18, culminating in the Create Performance Task. Big Ideas 1, 4, and 5 (Creative Development, Computing Systems and Networks, and Impact of Computing) are taught January – April.
PCEP-30-02 — Four Exam Blocks¶
Block |
Title |
PCEP Exam Weight |
|---|---|---|
Block 1 |
Computer Programming and Python Fundamentals |
18% |
Block 2 |
Control Flow — Conditional Blocks and Loops |
29% |
Block 3 |
Data Collections — Tuples, Dictionaries, Lists, and Strings |
25% |
Block 4 |
Functions and Exceptions |
28% |
Tentative Course Timeline (August 17 – December 18)¶
Unit / Topic |
Assessment |
Approx. Timeline |
|---|---|---|
Orientation & Course Setup |
Week 1 |
|
IDE setup (Coding Rooms / VS Code), Python program structure, syllabus & policies |
Aug 17–21 |
|
PCEP Block 1 — Computer Programming and Python Fundamentals |
Weeks 2–4 |
|
1.1 Fundamental terms: interpreter, compiler, lexis, syntax, semantics |
MCQ |
Aug 24–28 |
1.2 Python’s logic and structure — keywords, indenting, comments |
MCQ |
Aug 24–28 |
1.3 Literals and variables, numeral systems |
MCQ |
Aug 31–Sep 4 |
1.4 Operators and data types |
MCQ |
Sep 8–11 |
1.5 Console input/output operations |
MCQ |
Sep 8–11 |
Block 1 Exam |
MCQ + FRQ |
Sep 14–18 |
PCEP Block 2 — Control Flow: Conditional Blocks and Loops |
Weeks 6–9 |
|
2.1 The |
MCQ |
Sep 21–25 |
2.1 Compound and nested conditionals |
MCQ + FRQ |
Sep 28–Oct 2 |
2.2 |
MCQ |
Oct 5–9 |
2.2 |
MCQ + FRQ |
Oct 12–16 |
Block 2 Exam + Practice PT #1 (small algorithmic program) |
MCQ + FRQ + Project |
Oct 19–23 |
PCEP Block 3 — Data Collections: Tuples, Dictionaries, Lists, Strings |
Weeks 11–13 |
|
3.1 Tuples — creating, indexing, immutability |
MCQ |
Oct 26–30 |
3.2 Lists — creating, traversing, list methods |
MCQ + FRQ |
Nov 2–6 |
3.3 Dictionaries — building, indexing, iterating |
MCQ + FRQ |
Nov 9–13 |
3.4 Strings — indexing, slicing, string methods; list comprehensions |
MCQ |
Nov 16–20 |
Block 3 Exam + Practice PT #2 (data-driven program using a list) |
MCQ + FRQ + Project |
Nov 23–25 (short week — Thanksgiving) |
PCEP Block 4 — Functions and Exceptions |
Weeks 15–16 |
|
4.1 Decomposing code with functions; parameters, return values, recursion |
MCQ + FRQ |
Nov 30–Dec 4 |
4.2 Variable scope and organizing interactive programs; modules |
MCQ |
Dec 7–11 |
4.3 Handling exceptions with |
MCQ + FRQ |
Dec 7–11 |
Block 4 Exam |
MCQ + FRQ + Project |
Dec 11 |
Create Performance Task Development |
Week 18 |
|
Program development: list/data abstraction, student-developed procedure with parameters, algorithm with a decision-affecting operator (min. 12 hrs. dedicated class time per College Board) |
Project |
Dec 14–17 |
Video recording, written responses, Personalized Project Reference, AP Digital Portfolio submission |
Project |
Dec 18 |
— Semester 1 Ends — |
||
Big Ideas 1, 4, 5 (Creative Development, Computing Systems & Networks, Impact of Computing) and full AP Exam prep |
January – April |
Academic Support & Links¶
Academic Support Hours¶
Before school — 7:30 am – 8:30 am (contact me in advance)
After school — Tuesday – Thursday: 3:45 pm – 4:15 pm
Peer Tutoring — Monday through Friday, before and after school
AP Exam & Certification Resources¶
Resource |
Link |
|---|---|
AP College Board — CSP Course Page |
|
AP CSP Course and Exam Description |
|
AP Classroom (Daily Practice) |
|
AP Digital Portfolio (Create PT submission) |
|
PCEP-30-02 Exam Syllabus |
|
Python Documentation (Official) |
|
PEP 8 — Style Guide for Python Code |
AP Computer Science Principles Vocabulary & Exam References¶
Click Here
Below is a comprehensive list of vocabulary words every AP Computer Science Principles student should be familiar with. Did I miss a word? Please let me know…
Term |
Definition |
|---|---|
a ← expression |
Evaluates expression and then assigns a copy of the result to the variable a. |
DISPLAY(expression) |
Displays the value of expression, followed by a space. |
INPUT() |
Accepts a value from the user and returns the input value. |
a + b, a - b, a * b, a / b |
The arithmetic operators +, -, *, and / are used to perform arithmetic on a and b. For example, 17 / 5 evaluates to 3.4. The order of operations used in mathematics applies when evaluating expressions. |
a MOD b |
Evaluates to the remainder when a is divided by b. Assume that a is an integer greater than or equal to 0 and b is an integergreater than 0. For example, 17 MOD 5 evaluates to 2. The MOD operator has the same precedence as the * and / operators. |
RANDOM(a, b) |
Generates and returns a random integer from a to b, including a and b. Each result is equally likely to occur. For example, RANDOM(1, 3) could return 1, 2, or 3. |
a = b, a ≠ b, a > b, a < b, a ≥ b, a ≤ b |
The relational operators =, ≠, >, <, ≥, and ≤ are used to test the relationship between two variables, expressions, or values. A comparison using relational operators evaluates to a Boolean value. For example, a = b evaluates to true if a and b are equal; otherwise it evaluates to false. |
NOT condition |
Evaluates to true if condition is false; otherwise evaluates to false. |
condition1 AND condition2 |
Evaluates to true if both condition1 and condition2 are true; otherwise evaluates to false. |
condition1 OR condition2 |
Evaluates to true if condition1 is true or if condition2 is true or if both condition1 and condition2 are true; otherwise evaluates to false. |
aList ← [value1, value2, value3, …] |
Creates a new list that contains the values value1, value2,value3, and … at indices 1, 2, 3, and … respectively and assigns it to aList. |
aList ← [] |
Creates an empty list and assigns it to aList. |
aList ← bList |
Assigns a copy of the list bList to the list aList. For example, if bList contains [20, 40, 60], then aList will also contain [20, 40, 60] after the assignment. |
aList[i] |
Accesses the element of aList at index i. The first element of aList is at index 1 and is accessed using the notation aList[1]. |
x ← aList[i] |
Assigns the value of aList[i] to the variable x. |
aList[i] ← x |
Assigns the value of x to aList[i]. |
aList[i] ← aList[j] |
Assigns the value of aList[j] to aList[i]. |
INSERT(aList, i, value) |
Any values in aList at indices greater than or equal to i are shifted one position to the right. The length of the list is increased by 1, and value is placed at index i in aList. |
APPEND(aList, value) |
The length of aList is increased by 1, and value is placed at the end of aList. |
REMOVE(aList, i) |
Removes the item at index i in aList and shifts to the left any values at indices greater than i. The length of aList is decreased by 1. |
LENGTH(aList) |
Evaluates to the number of elements in aList. |
RETURN(expression) |
Returns the flow of control to the point where the procedure was called and returns the value of expression. |
MOVE_FORWARD() |
The robot moves one square forward in the direction it is facing. |
ROTATE_LEFT() |
The robot rotates in place 90 degrees counterclockwise (i.e., makes an in-place left turn). |
ROTATE_RIGHT() |
The robot rotates in place 90 degrees clockwise (i.e., makes an inplace right turn). |
CAN_MOVE(direction) |
Evaluates to true if there is an open square one square in the direction relative to where the robot is facing; otherwise evaluates to false. The value of direction can be left, right, forward, or backward. |
block |
A piece of code that is separated from the code around it |
body |
The code inside of a method |
boolean |
A type of variable or operation that evaluates to true or false |
braces |
Symbols that define the start and end of a block of code |
break |
A statement to jump outside of a loop or conditional branch |
bugs |
Problems that prevent code from working properly |
byte |
Eight bits |
bytecode |
The Java code that is ready to be processed by an interpreter |
capacity |
The amount of space allocated for a List |
case |
Identifies a code choice of a switch statement |
cast |
Forcing an expression of one data type to fit into a variable with a different type |
catch |
A keyword used to collect and handle specific types of exceptions |
change |
Setting a part of the condition to a different value so the code doesn’t loop infinitely |
char |
A data type for holding a single letter, digit or symbol |
class |
Code that defines the attributes and behaviors of an object |
class |
definition All of the method headers and instance variables that make up a class |
class |
declaration The header line of a class |
class |
variable A variable that is shared among all instances of a class (aka static field) |
client |
A class that uses another class |
column |
A vertical organization of items in a 2D array, the second set of brackets |
comments |
A written description of what code does for human readers |
Comparable |
An interface requiring compareTo that allows built-in sort and searches to be used on a class |
comparator |
A class implementing compare that creates a tool for sorting and searching |
compare |
A tool that is used to check the order between two objects passed as parameters |
compareTo |
A method that is used to check the order between an object and a single parameter |
comparisons |
When an expression or constant is checked for a relationship with another |
compatible |
Data types that contain similar enough values that they can be cast to each other |
compiler |
The part of an IDE used to change turn code into software |
compound |
A complex line of code with made of multiple expressions |
compound assignment operator |
+=, -=, *=, /=, %= |
concatenation |
An operation that creates a new string out of other strings by sticking them together |
concrete |
A class that can be instantiated, a non abstract class |
condition |
A statement that can be evaluated to determine if a piece of code will be run |
conditional |
A statement that is dependent on an expression that evaluates to true or false |
console application |
A piece of software that runs without a GUI |
conspicuous |
Variable names that clearly describe the value they represent |
constant |
A variable that cannot change once its initial value is assigned |
constructor |
A piece of code that is run when an object is instantiated/created |
contents |
What is inside of a data set or element |
convention |
An agreed upon way of coding that is not required by the computer |
convert |
Changing values of one type into another |
copy constructor |
A special constructor that takes a parameter of the same type as the class being created |
CPU |
The “brain” of your computer |
data type |
The kind of information that can be held in a variable |
debugger |
The part of an IDE that helps you find errors in your code |
declaration |
The line where a class, method or variable is first created |
decrement |
Decreasing a value by 1 |
default constructor |
A constructor provided by the compiler when no constructor is coded |
DeMorgan’s Laws |
Rules that describe how logical operations relate and transform into each other |
derived class |
A class that inherits from another class (aka subclass) |
digital |
Using whole numbers |
direct manipulation interface |
An interface that allows the user to interact with program constructs manually |
do-while |
A type of loop with the condition at the end that always executes at least once |
document |
To create help files and comments to make notes for future users and editors |
dot notation |
A way of referencing a method or variable that is part of a class |
double |
The most common data type for decimal numbers |
editor |
The part of an IDE used to type code |
element |
A individual item in an array or list |
empty string |
A string variable that has memory allocated but no text (“”) |
encapsulation |
The practice of using setters and getters to control access to private variables |
equals |
A method that compares objects to see if they are the same |
equation |
A mathematical statement that two expressions have the same value |
evaluate |
Determine the current value of an expression |
exception |
An problem that occurs while a program is running that causes it to crash |
exception handling |
Code intended to catch runtime errors and handle them to prevent a crash |
executable |
A file ready to be run as a program by an operating system |
expression |
A piece of code that will be evaluated when it is run |
extends |
A keyword that is used to cause a class to inherit from another class |
false |
The opposite of true |
field |
A variable created and stored at the object level (aka instance variable) |
final |
A keyword used for creating a constant |
finally |
A keyword that attempts to run code after an exception has happened |
flowchart |
A graphic showing the paths that execution of a program may follow |
for |
A type of loop with the initialization, condtion and chage built into the header. A fixed number of times loop. |
for-each loop |
A special code block for traversing an array or list |
formatting |
Making numbers appear in as text in a particular way |
gate |
A component that does simple binary calculations |
generic type |
A superclass type shared by multiple subclass types |
getter |
A method that returns the value of a private instance variable (aka accessor) |
GUI |
The graphical user interface for interacting with a user |
hardware |
Physical component of a device |
HAS-A |
A relationship between classes where one class is used by another |
hierarchy |
A system for organizing in which each item is a superclass and/or subclass of another item |
high level language |
A language like Java that is converted to machine code before it is executated |
IDE |
An integrated development environment that contains the tools you need to write a program |
if-else |
The keywords used for conditional branching |
immutable |
A value that cannot be changed once created |
implementation |
The final code used to solve a programming problem |
implements |
A keyword that indicates a class will perform the job of an interface |
implicit |
Something that is assumed to be the case if not stated otherwise |
import |
A keyword that allows you to use code from another package in your code |
increment |
To increase a value by a set amount |
indentation |
Shifting code to the right to indicated that it is inside a block |
index |
The number that represents each letter or element in a String, array or a List |
IndexOutOfBoundsException |
An error that happens when code accesses an element in an array that doesn’t exist |
infinite loop |
A piece of code that repeats itself forever |
information hiding |
The practice of making instance variables private to protect the internals operations of the code |
inheritance |
When a subclass gets code and variables originally created in the parent class |
initialize |
Allocate the memory for an array and set up beginning values |
Insertion Sort |
A sort with O(n^2) speed that finds the correct position of each element swapping as needed |
instance |
An object based on a class that exists when a program is running |
instance variable |
A variable stored at the class level (aka field) |
instantiate |
Creating and setting up and actual instance of a class to link to its variable, uses “new” keyword |
int |
The most common data type for non decimal numbers |
integer division |
The answer for why 7/2 is 3 and not 3.5 |
interface |
A programming construct that provides headers of required methods, but no code or variables |
interpret |
Preparing a Java application to be run for a specific operating system |
invoke |
A word meaning to call a method and run its code |
IS-A |
A subclass/superclass relationship between classes |
iteration |
One of many times executing the same piece of code |
iterative statements |
Sections of code that repeat in a predictable order |
JavaDoc |
A tool that creates documentation for code using comments with special syntax and keywords |
JDK |
The Java Development Kit needed for writing Java code |
key |
A piece of data in an object used to sort on |
length |
The number of items in an array |
length() method |
Used to find the number of characters in a string |
literal strings |
Text that is written in code between quotation marks |
local variable |
A variable created inside a method or other block of code |
logic error |
A coding mistake that causes code to act differently than planned |
logical operators |
Operators that combine or compare boolean expressions (eg. &&, |
loop invariant |
A relationship between variables that is checked to determine whether to loop again |
loops A |
ny piece of code that repeats when it reaches the end |
machine code |
A CPU specific binary language (aka assembly code) |
Mergesort |
A sort with O(n log n) speed that breaks the data set in half calling itself recursively |
method |
Code that defines an ability or behavior of an object |
minimized |
Code that takes the least space possible |
modifier |
A method used to change the value of a private variable (aka setter, mutator) |
modulus (%) |
An operator for finding the remainder from integer division |
motherboard |
Computer component all other parts connect to |
mutator |
A method used to change the value of a private variable (aka setter, modifer) |
nested |
Code that is inside another block of code |
nested loop |
A piece of repeating code inside another piece of repeating code |
new operator |
A keyword used when calling the constructor for an object being instantiated |
newline |
A character that tells the console to move the cursor to the next line |
no-args constructor |
An empty constructor, one that takes no parameters |
NOT |
Reverses value of the input |
null |
A keyword meaning “has no value” |
O notation |
A way of showing the relative theoretical speed of a search or sort algorithm |
object |
An instance of a class that exists when a program is running |
object model |
A planning tool used to design a class before coding it |
object oriented programming |
A programming philosophy in which code is written to represent real world things or ideas |
OR |
True if any input is true |
order of operators |
The rules that determine how the computer chooses which operations are evaluated first |
overloaded |
When a method is written in different ways with two or more possible parameter sets |
package |
A collection of java classes |
parameter |
A variable whose value or reference is passed into a method |
parse |
Move through a string one letter or word at a time |
partitioning |
The process of breaking a set into two or more pieces |
pass by reference |
When a parameter is sent as a memory location |
pass by value |
When a parameter is sent as data |
pattern recognition |
The ability to recognize a form of organization in a data set |
peripheral |
Computer part not inside the chassis |
pivot |
A value in a set used to split the set into two parts on which the data will be sorted |
polymorphism |
The concept that a single named behavior can be performed differently by various subclasses |
primitive type |
One of the built-in non-object data types that is stored by value |
printf |
A special method for Strings that includes formatting characters in the string literal |
private |
A keyword that makes a variable or method accessible from only inside the class |
procedural language |
A language where programs are expected to operate in a predictable order |
pseudocode |
A way of designing a program using written descriptions of what the code will be |
public |
A keyword that makes a variable or method accessible from outside the class |
Quicksort |
A sort with O(n log n) speed that splits the data using a randomly chosen pivot |
RAM |
Computer component that stores currently in-use data |
readability |
A measure of how easily something is understood by others |
recursive |
A piece of code that uses itself to solve the problem |
redundancy |
Allows a something to be understood even if some of it is missing or wrong |
reference |
An address that holds the memory location of the variable’s data |
regular expression |
A predefined set of codes for limiting parse and search type String operations |
relational operators |
Operators that compare two expressions (eg. <>, !=, ==) |
remove |
A method for taking an item out of a list and filling any gap |
reserved word |
Special words used by the Java language that cannot be used for naming |
return |
A statement that causes a method to end and may send back a value to the calling code |
return type |
The kind of data that will be sent back by a method |
row |
A horizontal section of a 2D array, the first set of square brackets |
scope |
The part of code in which a variable exists or is accessible |
search |
Finding a particular item in a list, array or other collection |
Selection Sort |
A sort with O(n^2) speed that checks each element against every other element |
Sequential Search |
A search that checks each element from beginning to end |
set |
A method for changing the value of an item in a list |
setter |
A method that is used to change the value of a private variable (aka modifier) |
short-circuit evaluation |
A chain of relational or conditional expressions that stops evaluating as soon as the result is known |
signature |
The header line of a method that defines its return type, name and parameter list |
size |
The number of items in an ArrayList |
software engineering |
Planning, designing, building and testing computer programs |
sorting |
Putting a collection of data in order |
source code |
The original code created by the programmer |
square brackets |
Used to create arrays and refer to a specific element |
stack T |
he part of the computer that keeps track currently running layers of code |
statement |
A complete and syntactically correct line of code |
static field |
A variable that is shared among all instances of a class (aka class variable) |
static method |
A method that uses no (non-static) instance variables and can be called without an instance of the class |
String |
A built-in class for holding words, sentences, parahraphes, etc. |
style |
The conventions agreed upon by programmers for how to write code to be understood by others |
subclass |
A class that inherits from another class |
subinterface |
An interface that inherits from another interface |
subscript |
A way of writing an index to an array in pseudocode |
substring |
A part of a text value |
super |
A keyword that is used to access methods and fields from a base class |
superclass |
A class that another class inherits from (aka base class) |
superinterface |
An interface that another interface inherits from |
switch |
A keyword that chooses what code to run based on a single value |
symbolic |
A name that represents another value |
syntax |
The rules for how code must be entered to compile and work |
syntax error |
A coding mistake that prevents code from compiling |
testing |
Checking the condition on a piece of code |
this |
A keyword that refers to the current instance of the class |
transistor |
A tiny on-off switch |
transmission |
Moving something from one place to another |
traversal |
The process of interacting with each element in an array or list in order |
true |
The opposite of false |
try |
A keyword that begins a block code that could cause an exception |
Two-Dimensional Array |
An array of arrays |
uninitialized string |
A string variable that is named but has nowhere to store its data |
value |
Data represented by a variable or expression |
variable |
A named value in a program that can contain a specific type of data |
visual prototyping and design tools |
Tools that allow an engineer to plan their software through drawings and flow models |
while |
A type of loop that runs as long as its condition is true |
whitespace |
Any space, tab or new line charcter in the code |
wrapper class |
A class designed to add behaviors to a primitive type |
Comments¶
Docstring header required at the top of every
.pyfile (see Submission Requirements).Function docstrings (triple-quoted strings immediately under a
defline) describe what the function does, its parameters, and its return value.Inline comments (
#) explain the why behind non-obvious logic — not the what. Leave at least two spaces before an inline#comment.Every function should have a brief docstring describing its purpose.