100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
AP Computer Science Principles Full Course Notes. 31 Pages -> Guaranteed 5 $5.49   Add to cart

Class notes

AP Computer Science Principles Full Course Notes. 31 Pages -> Guaranteed 5

 12 views  0 purchase
  • Course
  • Institution

AP Computer Science Principles Full Course Notes

Preview 4 out of 31  pages

  • May 20, 2024
  • 31
  • 2023/2024
  • Class notes
  • N/a
  • All classes
avatar-seller
See AP Classroom’s Exam Reference PDF for a list of commands and their
corresponding explanations.

Use the comments in the code!

Collaborate! Tools Github, Repl.it

Program Function and Purpose:

The purpose of computing innovations is to solve problems or pursue interests
through creative expression. An understanding of the purpose of computing
provides developers with an improved ability to develop that computing
innovation.

Programs receive input.

Most programs are written in an event-driven environment. “Events” are triggered
by some action. E.g., mouse clicks (often executed by jumping to a corresponding
code segment (e.g., functions))

A program is a collection of statements. A statement is a single command. A group
of statements is called a code segment. Code segments are executed according to
the rules of the programming language. A program is often referred to as software.

Plan Projects

Developers test the program every step of the way!

Development process and User Interface (UI)

Credit must be given to coders through a project’s documentation. Code segments,
procedures, and algorithms are considered intellectual property.

How is a program developed?

Programmers create something called program documentation.

in order to:

, 1. Describe the overall program.
2. List program specifications.

Describe:

1. Functions, procedures, and methods within the code
2. Specific code segments
3. List of events and corresponding outputs

The development of the program

1. How other programs may interact with the program
2. list of contributors and authors of the program

Identifying and Correcting Errors:

4 Types of Errors:

1. A logic error is a mistake in an algorithm or program that causes it to behave
incorrectly or unexpectedly.
2. A syntax error is a mistake in the program where the rules of the
programming language are not followed. (E.g Print(“_”) vs print(“_”)
3. A run-time error is a mistake in the program that occurs during the
execution of the program. Programming languages define their own runtime
errors. (E.g Index out of range, undefined variable, etc.)
4. An overflow error is an error that occurs when a computer attempts to
handle a number that is outside of the defined range of values.

The following are effective ways to find and correct errors:

1. Test cases
2. Hand tracing
3. Visualizations
4. Debuggers
5. Adding extra output statement(s)

Integrated Development Environment (IDE)

,Test, Test, Test

—-------------------------------------------------------------------------

Binary Numbers:

The decimal number system uses ten digits.

The binary number system uses two digits.

1 represents an electrical signal in your computer turned on.

0 represents an electrical signal in your computer turned off.

A bit is the smallest unit of data in computing (0, or 1).

A byte consists of 8 bits.

Circuits in computer processors are made of billions of transistors.

The 1’s and 0’s can really represent anything.

Digital data and abstraction:

Abstraction reduces complexity.

At the lowest level, bits represent all digital data. It is the lowest level of
abstraction.

Analogue:

A mechanism, device, or technology that represents data by measuring a
continuous physical variable. (e.g., painting, recording)

Sampling: The values of analogue signals are measured at regular intervals, and
samples are used to figure out the exact bits required to create and store the
analogue data in digital form.

Binary:

, Integers are represented in computers using a fixed number of bits. E.g some
programming languages store data values in up to 4 byes or 32 bits. Going over the
computer’s bit-integer limit results in an overflow.

Round off Errors - Programming languages can have problems with numbers such
as pi in which numbers are rounded within the fixed range. (Which may result in
rounding errors)

E.g




Adding a bit allows us to double the number of possible numbers a sequence of bits
can represent.

Binary works in base 2 format starting 2^0 and on.

Data Compression:

Data Compression: Data compression is the process of encoding information using
fewer bits than the original representation.

Compression & Decompression of Data (Fully restoring)

Fully restoring = Lossless compression.

Tradeoff of storage for computation.

File extensions are given along with compressed data to tell the computer what
decompression algorithm to use. (E.g .ZIP, .JPG, etc).

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller ethanwu. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $5.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

75759 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$5.49
  • (0)
  Add to cart