0% found this document useful (0 votes)
193 views26 pages

Ap CSP Guide

AP CSP guide all units

Uploaded by

41273
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
193 views26 pages

Ap CSP Guide

AP CSP guide all units

Uploaded by

41273
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

AP

COMPUTER
SCIENCE
PRINCIPLES
COURSE STUDY GUIDE
BY: SIMPLE STUDIES
note: this guide was designed to align with the 2019 CED

Intro to AP CSP

AP computer science principles (CSP) is a course that teaches the computational thinking
conventions and the concepts which are central to computer science. It is organized around five

ideas that are studied throughout the entire course. These ideas help build a base for prospective

computer science courses you may take in the future.


The main ideas are as follows: Creativity, Abstraction, Data/Information, Algorithms,
Programing, The internet, and Global impact. (note that these ideas are not organized by units

and are present in all the units).

Main ideas
● Creativity: creativity is an important part of innovation.
● Abstractions: abstractions minimize extra details so that you can focus on the pertinent
information. It helps manage complexity.
● Data/Information: Data and information are the input for computing and we use
computation to translate raw data into consumable information
● Algorithms: algorithms are used to develop solutions to computational problems
● Programming: programming and the creation of software enables problem-solving and is
directly related to creating algorithms
● The Internet: The internet has a heavy effect on society and it is important to understand
how it is built and functions. This is important when analyzing concerns
such as cybersecurity
● Global Impact: computation has changed the way in which we communicate and problem
solve.
Unit 1: The Internet

Vocab
**Definitions are provided by college board we do not claim ownership of the vocabulary definitions in this course

- The Internet- A group of computers and servers that are connected.


- Prototype- an original model on which later versions are patterned
- Innovation- something new, a change; the act of introducing a new method, idea, device,
etc.

- Binary- A way of representing information using only two options.


- Bit- A contraction of "Binary Digit"; the single unit of information in a computer,
typically represented as a 0 or 1
- Bandwidth- Transmission capacity measure by the bit rate

- Bit rate- the number of bits that are conveyed or processed per unit of time. e.g. 8

bits/sec.

- Latency- Time it takes for a bit to travel from its sender to its receiver.

- Protocol- A set of rules governing the exchange or transmission of data between devices.

- Abstraction- a simplified representation of something more complex.


- ASCII (American Standard Code for Information Interchange)- the universally
recognized raw text format that any computer can understand
- IP Address- A number assigned to any item that is connected to the Internet.
- Packets- Small chunks of information that have been carefully formed from larger
chunks of information.
- Network Redundancy- having multiple backups to ensure reliability during cases of
high usage or failure
- Router- A type of computer that forwards data across a network
- DNS (Domain Name System)-, this system translates domain names (like example.com)

to IP addresses (like 93.184.216.34)

- IETF (Internet Engineering Task Force)- develops and promotes voluntary Internet
standards and protocols, in particular the standards that comprise the Internet protocol
suite (TCP/IP).
- Request for Comments- how standards and protocols are defined and published for all
to see on the IETF website.
- HTTP (HyperText Transfer Protocol)- the protocol used for transmitting web pages over
the Internet
- TCP(Transmission Control Protocol) - provides reliable, ordered, and error-checked
delivery of a stream of packets on the internet. TCP is tightly linked with IP and usually

seen as TCP/IP in writing.


- URL (uniform resource locator)- An easy-to-remember address for calling a web page
like www.code.org
- SSL (Secure Sockets Layer)- standard security technology for establishing an encrypted
link between a web server and a browser.
- SSL Certificate- To create an SSL certificate, a web server requires an SSL certificate
that may be obtained from a Certification Authority (CA).
- TLS (Transport Layer Security)- A cryptographic protocol that provides end-to-end
communication security over networks and is widely used for internet connections and
online transactions. IETF standard to prevent tampering and message forgery and the

successor to SSL.
- SMTP (Simple Mail Transfer Protocol) - high-level protocol for formatting and sending
email messages between mail servers.
- POP (Post Office Protocol)- IMAP (Internet Message Access Protocol) are used to
retrieve emails on the server's side
- HTML (Hypertext Markup Language)- a computer code used to tell a web page how to
look.
- Net Neutrality- the principle that all Internet traffic should be treated equally by Internet
Service Providers.

Sending information

● The internet works a lot like a postal service that ships binary information.

○ binary information is made of bits - any pair of opposites (like on or off, or yes or
no)
○ bits are sent in three ways- light, electricity, and wirelessly
■ Copper wire is used to send information electronically
Pros- cheap Cons- signal loss
■ Fiber optic cable is used to send information using light
Pros- Fast, no signal loss Cons- expensive, hard to work with
■ Radio waves are used to send wireless
Pros- mobile Cons- short range
○ bits are usually represented as either a 1 or a 0
■ this system of numbers is called binary or base2 (since there are 2 bases)

Reading binary

● Binary is a system of counting that has 2 bases unlike the decimal system that is used
commonly that has 10 bases
○ Binary is an on or off system which means that a bit is either on or off
● Binary is calculated from left to right and each digit is 2 to the power of n (the number of
spaces to the left)

● Below are some binary numbers


○ 0101 1001
1. Starting with 0, number all the digits from left to right (7654 3210)
2. Each digit is 2 to the power above ( 27262524 23222120 )
3. Disregard all digits with a 0 since they are “off” (2624 2320 )
4. Add all the numbers together (64+16+8+1)
5. The answer is 89
○ 10 1110
1. Starting with 0, number all the digits from left to right (54 3210)
2. Each digit is 2 to the power above ( 2524 23222120 )
3. Disregard all digits with a 0 since they are “off” (2523 2221)
4. Add all the numbers together (32+8+4+1)
5. The answer is 46
● ASCII (American
Standard Code for
Information Interchange)
is written using binary
with 8 bits or a byte
representing an ASCII
character.
Image from

https://bournetocode.com/projects/GCSE_Computing_Fundamentals/pages/3-3-5-ascii.html

How does information travel?


1. All information to be sent over the internet is cut into smaller packets. They are
numbered keep the order of the information
2. Information is sent over the internet in these smaller packages
● Information used to reconstruct the file is on the outside of the packages. (sender,
receiver, source file, packet number)
● Packets travel on their own through different routers trying to find the fastest path
always. Having extra routers for this purpose is called network redundancy. This
makes the system more fault-tolerant

3. TCP/IP process the packet by extracting and merging it’s inside data with the data from
the other packets from the same file, in the correct order, in order to rebuild the file from
its packets
● If there is missing/ incorrect data, TCP/IP from this computer will send a message
to TCP/IP on the sender computer, asking to resend a particular packet

Unit 2: Digital Information

Vocab
**Definitions are provided by college board we do not claim ownership of the vocabulary definitions in this course
- Heuristic- a problem-solving approach (algorithm) to find a satisfactory solution where
finding an optimal or exact solution is impractical or impossible.
- Lossless Compression- a data compression algorithm that allows the original data to be
perfectly reconstructed from the compressed data.

- Lossy Compression- irreversible compression; a data compression method that uses


inexact approximations, discarding some data to represent the content. Most commonly
seen in image formats like .jpg.
- Image- A type of data used for graphics or pictures
- Metadata- data that describes other data. ex. a digital image may include metadata that

describe the size of the image, number of colors, or resolution.


- Pixel- short for "picture element", the fundamental unit of a digital image, typically a tiny
square or dot that contains a single point of the color of a larger image.
- Hexadecimal- A base-16 number system that uses sixteen distinct symbols 0-9 and A-F
to represent numbers from 0 to 15.
- RGB- this color model uses varying intensities of (R)ed, (G)reen, and (B)lue light are
added together in to reproduce a broad array of colors
- Byte- 8 bits of data; the standard fundamental unit (or "chunk size") underlying most
computing systems today.
- File extension- a group of letters occurring after a period in a file name, indicating the
format of the file like .png
- Abstraction- a simplified representation of something more complex. they allow you to
hide details to help you manage complexity, focus on relevant concepts, and reason about
problems at a higher level
- Encoding- the processing of information into the memory system
- Decoding- interpreting and trying to make sense of the message
- Resolution- the dimensions by which you can measure how many pixels are on a screen
- Density- the number of pixels in a certain space
- Zip folders- a computer file whose contents of one or more files are compressed for
storage or transmission.

- Image file- a file that contains graphic data.


- Text file- a file that contains only text without any special formatting.
- Favicon- A small, customized icon shown in the address bar next to the URL or the
Favorites menu when a site is bookmarked.

How to read Hexadecimal numbers


● Hex is a system of counting that has 16 bases unlike the binary system that we use to
send information and has 2 bases
○ It uses the letters A-F since there are only 10 numbers
● Hex is also calculated from left to right and each digit is the number to the power of n
(the number of spaces to the left)

● Below are some binary numbers


○ C0D5
1. Starting with 0, number all the digits from left to right ( 3210)
2. Each digit is the number times 16 to the power above(Cx1630x162Dx1615x160)
3. Disregard all digits with a 0 since they are “off”; note that A-F correspond to
10-15 respectively (12x163 13x1615x160 )
4. Add all the numbers together (49152+208+5)
5. The answer is 49365

○ 7F
1. Starting with 0, number all the digits from left to right (10)
2. Each digit is 2 to the power above (7x161Fx160 )
3. Disregard all digits with a 0 since they are “off”; note that A-F correspond to
10-15 respectively (7x16115x160 )
4. Add all the numbers together (112+15)
5. The answer is 127

How to encode a color


● RGB is the color system used in computer screens, it is different from printers which
commonly use CMYK

Image from decalimpressions.com

○ As you can see in the image, CMYK is a subtractive color scheme that uses the
colors to tint the light which makes the colors darker as you mix them. All the
colors mixed added to a constant (k) makes black
○ RBG is an additive color scheme that uses colored light (which is why it's
commonly used in screens) so that the colors get lighter as you mix them. All the
colors added together to make white

● In a computer, colors are usually coded as a six-digit hex number.


○ Ex. #4G 76 F0
● Since the computer uses RBG, there are two digits for each value
○ So 4G is the amount of red light, 76 is the amount of green light, and F0 is the
amount of blue light
○ Some numbers to remember:
■ #000000 is black
■ #FFFFFF is white
■ #FF0000 is red
■ #00FF00 is green
■ #0000FF is blue

Units

Bit

Nybble 4 bits

Byte 8 bits

Kilobyte 1,000 (10^3) bytes

Megabyte 1,000,000 (10^6) bytes

Gigabyte 1,000,000,000 (10^9) bytes

Terabyte 1,000,000,000,000 (10^12) bytes

Petabyte 1,000,000,000,000,000 (10^15) bytes

Exabyte 1,000,000,000,000,000,000 (10^18) bytes

Files and Compression


● There are two types of compression
○ Lossy compression is irreversible and erases data by using inexact
approximations
■ Ex. .jpg, .mp3
○ Lossless compression is a compression algorithm that records patterns in a
dictionary and which allows the data to be reconstructed perfectly
■ Ex. .png, .wav

● Below is a chart of the relevant file types

File extension Data type/ Compression Background info


JPEG (.jpg) Audio; Lossy created by the joint
photographic experts group
in 1992; intended to be
free; some patent disputes

MP3 (.mp3) Audio; Lossy created by the moving


picture experts group in
1993; free; many
companies have tried to
claim ownership

PNG (.png) Image; Lossless created by the PNG


development group in 1996
and designed to replace the
GIF; free

MP4 (.mp4) Multimedia; Lossy created by the ISO/IEC and


Motion Picture Experts
Group; free

WAV (.wav) Audio; Lossless created by IBM and


Microsoft in 1991; free

Unit 3: Intro to Programming

Vocab
**Definitions are provided by college board we do not claim ownership of the vocabulary definitions in this course

- Algorithm- a precise sequence of instructions for processes that can be executed by a


computer and are implemented using programming languages
- Low level- a programming language that captures only the most primitive operations

available to a machine. Anything that a computer can do can be represented with


combinations of low-level commands
- High-level programming language- a programming language with many commands

and features designed to make common tasks easier to program. Any high-level
functionality is encapsulated as combinations of low-level commands
- Selection- a generic term for a type of programming statement (usually an if-statement)

that uses a Boolean condition to determine, or select, whether or not to run a certain
block of statements
- Sequencing- putting commands in the correct order so computers can read the
commands
- Function- a named group of programming instructions

- API (application programming interface)- a collection of commands made available to a


programmer
- Documentation- a description of the behavior of a command, function, library, API, etc

- Library- a collection of commands/functions, typically with a shared purpose

- Parameter- an extra piece of information that you pass to the function to customize it for
a specific need
- For Loop- a particular kind of looping construct provided in many languages. Typically,
defines a counting variable that is checked and incremented on each iteration to loop a
specific number of times
- Loop- a programming construct that repeats a group of commands

- Programming Language- a coding language used to dictate specific instructions to a


computer
- Programming Environment- a tool where you write and run computer programs

- Debugging- finding and fixing problems in your algorithm or program

- Top-Down Design- a problem-solving approach (also known as stepwise design) in


which you break down a system to gain insight into the subsystems that make it up
- Camelcase- multi-word function names are made a single word which begins in
lowercase and uses uppercase letters to indicate the start of a new word
- Iterate- to repeat to achieve, or get closer to, the desired goal

- Turtle Programming- a classic method for learning programming with commands to

control movement and drawing of an on-screen robot called a "turtle"

- Blocks- pieces of code that you use to solve a problem; in App Lab, they can be dragged
from the toolbox menu to the workspace to create a program
- Subgoal- parts of a problem's solution (the overall goal); used so you can focus on
figuring out which block(s) you need to solve each subgoal rather than trying to solve the
whole problem at once
- Efficiency- achieving some desired outcome while minimizing wasted effort or
resources
- Abstraction- a simplified representation of something more complex

- Iteration- "loop" by another name - the repetition of a statement, process, or procedure

Programming languages

● When you formalize language or commands that describe actions you are making a kind
of code.
● Computers are simply machines that can perform many different tasks.
○ In order, to write instructions for them to do something you must agree on the
“code”
○ Each action must have a precise, unambiguous meaning
● This is the basis of a programming language
○ You might think that a programming language looks like an archaic mass of
abstract words, but all programming languages are derived from the need to
concisely give instructions to a machine
● To design an algorithm:
○ Step1: Discover common instructions
■ This includes turning right, saving a number by changing a variable,
jumping to a certain line in the instructions, etc.
○ Step 2: Agree on a minimal instruction set
■ Recognizing these commonalities can give you names to a few commands
and agree about how they should be interpreted.

High vs Low level Programming languages


● High-level programming languages are more programmer-friendly which makes it easier
to understand and debug
○ Ex. JavaScript,
● Low-level languages, on the other hand, are tough to understand and require a machine

to operate. They are also not commonly used.


○ Ex. Machine Language
● High-level languages also make use of abstractions to manage complexity
○ An abstraction is a simplified representation of something more complex.
○ Abstractions are helpful because it makes it so that you do not need to understand
everything in complicated code.
■ Ex. The codes use functions in their programs to manage complexity by
allowing you to use the function without needing to know how the
function works or what code is in the function.
■ Below is an example of an abstraction
- This abstraction is helpful
because instead of having to
write the code for the fish
every time you want a new
fish, you can just add the
function with parameters.
- The parameters (size, red,
green, blue) are also very
helpful because they help
generalize the solution which
can make the function more
versatile.

Image is from code.org

Variables
● When you are
programming, variables are
used to hold information
○ They essentially work like containers where you can change their value when you
need to hold another number
○ Variables may look like simple math but it is not
○ Ex. x = 2
x=5
x=x+1
■ At first sight, the equation might not make sense, but x is a variable (so
remember it is like a container)
■ “=” is the assignment operator, so‘x=2’ means that you are assigning x the
value of 2
■ The value of x is now 6 because x is assigned the value of 5 + 1 which is 6

Looping and Random Numbers


● Looping is a programming construct that is used to repeat sections of code multiple
times.
○ Ex. for (var i = 0; i < 4; i++)
○ For loops are loops that define a counting variable (var i = 0) that is checked
(i < 4) and incremented ( i++) on each iteration to loop a specific number of times
● Random number is a mathematical function that allows any value to be a random number
within a maximum number and a minimum number.
○ Ex. moveTo(randomNumber(0,320), randomNumber(360,450))
○ The coordinates from the moveTo function were replaced by random numbers to
place the image randomly
○ The max and min on the random number are the dimensions of the screen

Unit 4: Big Data and Privacy

Vocab
**Definitions are provided by college board we do not claim ownership of the vocabulary definitions in this course

- Big Data- a broad term for datasets so large or complex that traditional data processing
applications are inadequate
- Moore's Law- a prediction made by Gordon Moore in 1965 that computing power will
double every 1.5-2 years, it has remained more or less true ever since.
- Caesar cipher- a technique for encryption that shifts the alphabet by some number of
characters
- Cipher- the generic term for a technique (or algorithm) that performs encryption

- Cracking encryption- When you attempt to decode a secret message without knowing
all the specifics of the cipher, you are trying to "crack" the encryption.
- Decryption- a process that reverses encryption, taking a secret message and reproducing
the original plain text
- Encryption- a process of encoding messages to keep them secret, so only "authorized"
parties can read it.
- Random substitution cipher- an encryption technique that maps each letter of the
alphabet to a randomly chosen other letters of the alphabet.
- Computationally Hard- a "hard' problem for a computer is one in which it cannot arrive
at a solution in a reasonable amount of time.
- Asymmetric Encryption- used in public-key encryption, it is a scheme in which the key
to encrypt data is different from the key to decrypt.
- Modulo- a mathematical operation that returns the remainder after integer division.

- Private key- In an asymmetric encryption scheme the decryption key is kept private and
never shared, so only the intended recipient has the ability to decrypt a message that has
been encrypted with a public key.
- Public key encryption- Used prevalently on the web, it allows for secure messages to be
sent between parties without having to agree on, or share, a secret key. It uses an
asymmetric encryption scheme in which the encryption key is made public, but the
decryption key is kept private.
- Antivirus software- usually keeps big lists of known viruses and scans your computer
looking for the virus programs in order to get rid of them.
- DDoS attack- Distributed Denial of Service Attack. Typically a virus installed on many
computers (thousands) activates at the same time and floods a target with traffic to the
point the server becomes overwhelmed.
- Firewall- software that runs on servers (often routers) that only allows traffic through
according to some set of security rules.
- Phishing scam- a thief trying to trick you into sending them sensitive information.
Typically these include emails about system updates asking you to send your username
and password, social security number, or other things.
- SSL/TLS- Secure Sockets Layer / Transport Layer Security - An encryption layer of
HTTP that uses public-key cryptography to establish a secure connection.
- Virus- a program that runs on a computer to do something the owner of the computer
does not intend.
- Digital divide- the gulf between those who have ready access to computers and the
Internet, and those who do not.
- Worm- a standalone malware computer program that replicates itself in order to spread
to other computers. It uses a computer network to spread itself, relying on security
failures on the target computer to access it.
- Vignere Cipher- a method of encrypting text by applying a series of Caesar ciphers
based on the letters of a keyword.
- Malware- software that is intended to damage or disable computers and computer
systems.

What is big data?


● Big data is a large and complex dataset that is useful and can be used to help the world in
many ways
○ A larger data set gives us access to much more information and more ways to
analyze and use that information.
○ Examples:
■ A car collecting data on your normal driving patterns so that when
someone else tries to drive, they need to input a password
■ Using images from biopsies to determine if cells are cancerous
The Digital Divide
● The digital divide is the rift between those with reliable constant access to the internet
and those who don’t.
○ Those who don’t are usually either senior citizens, have a lower income, or live in
areas with less internet access.
○ It is more important now than ever before because of how rapidly the internet and
internet use has become.
○ Examples:
■ A school that transitions to online learning and doesn’t provide anything
to students who need internet/computer assistance
■ A city council that sends out an online survey to see which roads in the
city have the most potholes/cracks and need to be filled up.

Ciphers
● Caesar cipher- shifts the alphabet by a certain number to obtain a new alphabet
○ Ex. cipher => elrjgt (shifted by 2)
● Vignere cipher- uses a series of Caesar ciphers based on a code word
○ Ex. cipher => eqeoii (keyword- cipher)
This chart shows how the caesar
ciphers are plotted in the vigenere
cipher and the plain text letter is
chosen by the key letter which is
repeated as many times as needed

● Random substitution cipher- plots each letter of the alphabet to another random letter
○ Ex. cipher => hednyuo

Encryption

● Asymmetric encryption is when the key to encrypt a message is different from the private
key used to decrypt the message.

● Public key encryption is an asymmetric encryption scheme prevalent on the web.


○ It allows you to encrypt something with a key that’s accessible to the public, but
to decrypt it, you would need a private key.
● Encryption is very necessary because otherwise hacking other people/stealing their

information would be too easy.

Hacking
● Some of the most common hacking attacks include DNS spoofing, DDoS attacks,

worms, and phishing scams.

○ DNS spoofing: when the Domain Name System is hacked to redirect online

traffic to a certain website to an imposter website.

■ Ex. the attacker spoofs a DNS record to redirect all the traffic that relied
on the correct DNS record to visit a fake website that the attacker has
created to resemble the real site or a different site completely.

○ DDoS (Distributed Denial of Service) attacks: A virus installed on many

computers activates at the same time and floods a target with traffic. DDoS is one
of the oldest forms of cyber extortion attack
■ Ex. A virus causes thousands of computers to send so much internet
traffic to a server to the point that legitimate users can't join
○ Phishing attack: a thief trying to trick you into sending them sensitive

information.

■ Ex. You get an email from someone who is claiming to be your great aunt

twice removed and wants to give you a million dollars. She asks for your
bank account information so that she can transfer the money

Unit 5: Building Apps


Vocab
**Definitions are provided by college board we do not claim ownership of the vocabulary definitions in this course

- Callback function- a function specified as part of an event listener; it is written by the


programmer but called by the system as the result of an event trigger
- Event- An action that causes something to happen
- Event-driven program- a program designed to run blocks of code or functions in
response to specified events
- Ex. a mouse click

- Event handling- an overarching term for the coding tasks involved in making a program

respond to events by triggering functions.

- Event listener- a command that can be set up to trigger a function when a particular type
of event occurs on a particular UI element
- UI elements- on-screen objects, like buttons, images, text boxes, pull down menus,
screens and so on
- User Interface (UI)- The visual elements of a program through which a user controls or
communicates with the application
- Debugging- Finding and fixing problems in an algorithm or program

- Data type- All values in a programming language have a "type" - such as a Number,
Boolean, or String - that dictates how the computer will interpret it.
- Ex. 7+5 is interpreted differently from "7"+"5"

- Expression- Any valid unit of code that resolves to a value

- Variable- A placeholder for a piece of information that can change

- Equality operator- Is used for comparing two values, and returns a Boolean (true/false).
Avoid confusion with the assignment operator "="; sometimes read "equal equal" (==)
- Global variable- A variable whose scope is "global" to the program, it can be used and
updated by any part of the code. Its global scope is typically derived from the variable
being declared (created) outside of any function, object, or method
- If-statement- The common programming structure that implements "conditional
statements"
- Local variable- A variable that can only be seen, used and updated by code within the
same scope. Typically this means the variable was declared (created) inside a function;
includes function parameter variables.
- Variable scope- dictates what portions of the code can "see" or use a variable, typically

derived from where the variable was first created. (Global v. Local)

- Concatenate- to link together or join. Typically used when joining together text Strings
in programming
- Ex. "Hello, "+name

- String- Any sequence of characters between quotation marks


- ex: "hello", "42", "this is a ---"
- Conditionals- Statements that only run under certain conditions

- Selection- A generic term for a type of programming statement (usually an if-statement)

that uses a Boolean condition to determine, or select, whether or not to run a certain

block of statements.

- Boolean- A single value of either TRUE or FALSE; created by the mathematician,


George Boole
- Boolean expression- in programming, an expression that evaluates to True or False

Intro to Design mode


1. This is a switch between design mode and code mode.
a. Design mode allows you to add UI elements onto the screen and change the
position of them. It also allows you to add and move between screens
b. Code mode allows you to add event handlers to control what goes on in the
screen.
2. To add elements onto the screen, just drag the element to the place you want to put it.
a. Once it's on the app screen you can reposition it, resize it and change lots of other
properties about it
3. The Properties tab shows you everything you can change about the look and feel of a UI
element
a. This includes things like size, color, shape, position, and text
b. You can also change the id of the element
i. It is context-sensitive which means that the set of properties you see
depends on what you click on in the app.
4. The element ID is important because it's how you refer to the element in your code.
a. Always make sure to use a meaningful id that is not too general
5. You can make the text that the user sees on the button text be whatever you like.

6. Scroll down to see other properties for a UI element that might be "hiding" down below.

Data Types

● Number- self-explanatory; an integer


○ Ex. 5,8
● String- characters in quotation marks concatenated together
○ Ex. “5”+” + 7” + “ is equal to”
● Boolean- true or false
● Data can be held in variables

Global vs Local

You might also like