AP CSP FINAL [INCLUDES ALL UNITS]

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What makes compression a heuristic.

through compression, there are many different options and routes to compress a file; thus, compression is a heuristic because you would have to try all different approaches to find the best one- which is impractical and takes a long time so finding a "good" one is good enough

What does it mean to broadcast a packet?

to broadcast a packet means it is shared to routers; thus everyone knows the message you may send

Metadata

Data that describes other data. For example, a digital image may include metadata that describe the size of the image, number of colors, or resolution; makes word documents larger than text files

Difference between public and private key .

PUBLIC: you put this key somewhere that someone can grab, like your personal web page PRIVATE: you keep this key on your computer and never distribute it

Code

to write code, or to write instructions for a computer

How are packets routed on the network?

they are not routed in a specific way because their path may change every single time finds the cheapest(as in time, politics, relationships) and fastest route

decrypt

use an algorithm to decode a message

encrypt

use an algorithm to encode a message

What is DNS spoofing and how does it work?

when a hacker hacks into a DNS server changing the IP address to a domain name; this sends the user to a fake website

Why are packets lost?

wifi/router/server problems; lose connection; too much traffic

Differnce between a global variable and a local variable

you can create a variable outside or inside a function. The term for this concept is "variable scope." The scope of a variable defines which parts of your code can access and modify the variable. - there are two scopes: global and local

Loop

a programming construct that repeats a group of commands.

Why is lossy compression important and how is it used.

"Lossy" compression schemes remove "useless" or less-than-totally-necessary information to reduce the size of the data. mostly used in visual or audio formats where a loss in precision is undetectable to human eyes and ears

Request for Comments

(RFC) documents are how standards and protocols are defined and published for all to see on the IETF website.

Bit rate

(sometimes written bitrate) the number of bits that are conveyed or processed per unit of time. e.g. 8 bits/sec.

Which of the following is NOT true about packets? - Packets are numbered so if they arrive out of order the message can be reassembled - A message sent across the Internet can always be contained in a single packet - Packets are routed on different paths from sender to receiver - The receiver computer must confirm to the sending computer that each packet was received

- A message sent across the Internet can always be contained in a single packet

Which two of the following statements are true about routing the internet? - Information travelling between two computers over the Internet will always take the same path - Your router receives all the traffic on the Internet and delivers to your computer only the messages intended for you - There is one router which receives and redirects all the traffic of the Internet - A packet travelling between two computers on the Internet may be rerouted many times along the way - A packet contains addressing information to allow routers to decide how best to forward along that packet towards its destination

- A packet travelling between two computers on the Internet may be rerouted many times along the way - A packet contains addressing information to allow routers to decide how best to forward along that packet towards its destination

Identify the two true statements about HTTP. - An HTTP request is sent from a client to request access to data stored on a server - HTTP requests and responses have identical formats - Displaying a web page will often require multiple HTTP requests in order to acquire all the necessary data - An HTTP response code is only used when a server could not fulfill a request

- An HTTP request is sent from a client to request access to data stored on a server - Displaying a web page will often require multiple HTTP requests in order to acquire all the necessary data

To able to use functions with parameters to solve problems and reduce complexity.

- Parameters allow the creation of a generalized solution to a whole class of problems, rather than individually solving many specific problems. - Parameters remove the need to create repetitive functions, making code easier to write, read, and change.

Pick the two statements about packets and routing on the Internet which are true - Packets travelling across the Internet take a standardized amount of time and so can be counter on to arrive in the order they were sent - TCP ensures messages can be reliably transmitted across the internet - TCP depends on the infrastructure of the Internet to be reliable enough to ensure no packets are lost in transmission - TCP must account for the fact that packets may not arrive at a destination computer in the intended order

- TCP ensures messages can be reliably transmitted across the internet - TCP must account for the fact that packets may not arrive at a destination computer in the intended order

If the post office delivered mail exactly like routers deliver messages on the internet, which 2 of the following statements would be true? -One mailman would be responsible for delivering a letter from a sender to receiver -The mailman would sometimes take a different path to deliver each letter to your home -Letters would be written on the outside of envelopes for all to read instead of letters put inside envelopes -Your mail could not be delivered if a road your mailman was planning to take were under construction

-The mailman would sometimes take a different path to deliver each letter to your home -Letters would be written on the outside of envelopes for all to read instead of letters put inside envelopes

How is big data used?

-solve problems ex: google maps uses big data

Can you know in advance the path a message will take between you and another computer on the Internet? Justify your answer.

...

Describe the concept of a number system. Why are rules required for a number system to be useful?

...

Describe the relative benefits of routing over a broadcast style of communication. Is routed traffic more secure than broadcasting? Justify your answer.

...

In 100 words or less describe how place value is used in the binary number system. How is it similar or different from the way place value is used in the base 10 number system.

...

What feature of DNS and IP allow the internet to scale?

...

Why do computers need to periodically check the DNS for websites you have already visited?

...

The word "Apple" translated into its ASCII number decimal (equivalent) is:

065 112 112 108 101

Size of 1 ASCII character

1 byte or 8 bits

List 3 characteristics of the ideal encryption scheme.

1) should be flexible, so it can be used for all messages 2) both sides need to know the key 3) needs to be able to work

Check the two items that are true statements about functions: 1. Meaningful function names help people better understand programs. 2. Meaningful function names help computers better understand programs. 3. Functions in programming are useful mathematical tools for doing complex computations. 4. Functions in programming are named groupings of programming instructions.

1. Meaningful function names help people better understand programs. 4. Functions in programming are named groupings of programming instructions.

If I understand how the internet works then I will be able to...

1. make informed choices to support or oppose decisions my government makes about access to the internet 2. make informed choices about my privacy on the internet

What is 13 MOD 17?

13

You have a coordinate that is 96x96. Assuming that you encode the x and y coordinate as separate numbers, what is the minimum number of bits that you will need to encode the coordinates in that space?

14 bits

When responding to a question with 4 choices, the most efficient method will require ____ number of bits

2

Algorithm

A precise sequence of instructions for processes that can be executed by a computer and are implemented using programming languages. (NOTE: this is the definition from the AP CS Principles framework). also, algorithms can be combined to make new algorithms

Consider a these various uses of randomNumber. Each answer describes the use and shows a code example. Which one of the following is NOT a valid use of randomNumber 1. Calling the parameters of a function: drawSquare(randomNumber(25,75)); 2. Defining the parameters of a function: function drawwShape(randomNumber(25,75)){ // function body code not shown } 3. Moving the turtle around the screen: moveForward(randomNumber(25,75)); 4. Orienting the direction of the turtle: turnLeft(randomNumber(25,75)); 5. Setting pen properties: penWidth(randomNumber(25,75)) 6. None of the above

2. Defining the parameters of a function: function drawwShape(randomNumber(25,75)){ // function body code not shown }

Select 2 true statements about functions with parameters: 1. Parameters can only be used once within the body of a function 2. Functions with parameters can be used to prevent the creation of duplicated code 3. Parameters help generalize the solution of a specific problem 4. Values do not need to be provided to a function with parameters in any particular order

2. Functions with parameters can be used to prevent the creation of duplicated code 3. Parameters help generalize the solution of a specific problem

Which of the following statements about writing functions and Top-Down design is NOT true? 1. Writing functions helps manage complexity in a program. 2. Top-Down Design leads to programs which feature multiple layers of abstraction 3. Two programmers solving the same problem using Top-Down Design should arrive at the identical programs. 4. Top-Down Design relies upon identifying sub-problems of a larger problem 5. Top-Down Design assists in identifying the layers of functions that will be used to solving a programming problem

2. Top-Down Design leads to programs which feature multiple layers of abstraction

How many bits? ASCII has an encoding for every character of the alphabet as well as encodings for numbers -- that is, encodings for the symbols of the digits 0-9. So here is a trick question: How many bits are required to store the text of the number "150" in ASCII?"

24 bits

The Caesar Cipher has 25 different shifts to try. How many possibilities are there to try in a random substitution cipher?

26 × 25 × 24 ×···× 3 × 2 x 1

Which of the following is NOT part of defining a function? 1. Giving the function a name 2. Identifying the parameters of the function 3. Giving the parameter's a value 4. Adding code to the body of the function

3. Giving the parameters a value

How many address can be created with a version 4 IP address and with a version 6 IP address?

4 billion+; 340 undecillion unique address

What is 20 MOD 15?

5

What is the minimum number of bits you need to encode the 26 letters of the alphabet plus a space?

5 bits

Which of the following is NOT a true statement about functions? 1. Functions are reusable programming abstractions 2. Functions help reduce the complexity of writing and maintaining programs 3. Functions help break a problem into logical chunks 4. Once defined, a function can be called many times from different parts of a program 5. Functions cannot make calls to other functions written by the same programmer

5. Functions cannot make calls to other functions written by the same programmer

How many unique IP Addresses could be made in a fixed-length IP address system using 6 bits?

64 users

The standard QWERTY keyboard has 47 keys that can place characters on the screen. Each of those keys can also display a second character by holding the "Shift" key at the same time. How many bits would you need to encode everything that could be typed on this keyboard?

7 bits

If you just have two shapes (say a square and a circle), how many 3-place patterns could you make?

8

Prototype

A preliminary sketch of an idea or model for something new. It's the original drawing from which something real might be built or created.

hexadecimal

A base-16 number system that uses sixteen distinct symbols 0-9 and A-F to represent numbers from 0 to 15.

One Pager

A business/corporate term for a one-page document that summarizes a large issue, topic or plan. The purpose is to distill and highlight the most important pieces of information in a digestible manner so that the reader can be quickly acquainted with the relevant details of the "big picture."

packet

A chunk of information that gets sent on the internet

Lossy Compression

A compression scheme in which "useless" or less-than-totally-necessary information is thrown out in order to reduce the size of the data. The eliminated data is unrecoverable

Lossless Compression

A compression scheme in which every bit of the original data can be recovered from the compressed file

Aggregation

A computation in which rows from a data set are grouped together and used to compute a single value of more significant meaning or measurement. Common aggregations include: Average, Count, Sum, Max, Median, etc. -For example, if some dataset contained information about how many hours of television people watched and included their age, you could "aggregate the data by age" and compute the average hours watched for each age group. You could also "aggregate by hours of TV watched" and compute the average age for each number of hours

Server

A computer that awaits and responds to requests for data

Client

A computer that requests data stored on a server

Bit

A contraction of "Binary Digit". A bit is the single unit of information in a computer, typically represented as a 0 or 1

array

A data structure in JavaScript used to represent a list.

README

A document providing background information about a dataset

How does abstraction help manage complexity?

A form of abstraction is breaking a problem down into layers of sub-tasks, and writing well-named functions that solve those tasks. While abstraction is occurring, it also makes it easier for the programmer/user to understand

list

A generic term for a programming data structure that holds multiple items.

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.

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. ex: if statements

The Internet Engineering Task Force (IETF) defines the protocols and standards for how the Internet works. The members of IETF are:

A loosely organized collection of citizens and engineers who communicate mostly by email

IP Address

A number assigned to any item that is connected to the Internet

Hexadecimal Number System

A number system consisting of 16 distinct symbols — 0-9 and A-F — which can occur in each place value.

IPv4 packet

A packet of data that uses 32-bit addresses

For Loop

A particular kind of looping construct provided in many languages. Typically, a for loop defines a counting variable that is checked and incremented on each iteration in order to loop a specific number of times.

Function

A piece of code that you can easily call over and over again.

Low level programming language

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.

Hypothesis

A proposed explanation for some phenomenon used as the basis for further investigation

A binary question is defined as...

A question which can be answered in only one of two possible

Protocol

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

Boolean

A single value of either TRUE or FALSE

Summary Table

A table of aggregate information about a data set (e.g., the average, sum, count of some values) A table that summarizes information about some larger data set. It typically consists of performing computations like sums, averages, and counts on higher level groupings of information. The intent is to summarize lots of data into a form that is more useful, and easier to "see"

What is top-down design and why is it used.

A technique for deciding what functions you should write is to look at the problem with a "top-down design" perspective. The process of creating software begins long before the first lines of code are written. Breaking a problem down into layers of sub-tasks, and writing well-named functions that solve those tasks is a creative act of abstraction. It also leads to good code that is more efficient, easier to read, and therefore easier to debug when problems arise. In professional settings, teams of people first identify the problems and sub-problems the particular software will be addressing and how it will be used. This approach to designing software is critical when facing large-scale programming tasks. Once the problem is well understood, it can be broken into parts that teams or individual programmers can begin to work on solving at the same time. Full software systems take advantage of the power of abstraction; each programmer in a team can write code, assuming the subproblems will be solved and written by other teammates.

Router

A type of computer that forwards data across a network

Image

A type of data used for graphics or pictures

return value

A value sent back by a function to the place in the code where the function was called form - typically asking for value (e.g. getText(id)) or the result of a calculation or computation of some kind. Most programming languages have many built-in functions that return values, but you can also write your own.

GLOBAL VARIABLES

A variable declared outside a function, becomes global. A global variable has global scope which means the variable is accessible and modifiable throughout your program by any code, and also in any function. In the example to the right we say that lives is a global variable. -Global variables are useful for keeping track of data over the lifetime of the program that's running. -created and initialized in the very first lines of code in a program. === COMMON PITFALLS Because you can create a global variable anywhere in your code that is outside of a function definition, you can get yourself into trouble if you have variable declarations scattered throughout a large program. You might accidently re-create or create a new variable for a purpose you've already made a variable for.

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.

Binary

A way of representing information using only two options

What is a function parameter?

A way to give input to a function that controls how the function runs

protocol

A well-known set of rules and standards used to communicate

A binary message consisting of four bits was sent to you by a friend. The message was supposed to be ABAB. Unfortunately, your friend set the bit on the wire once every 2 seconds, but you read the wire once every second. Assuming that the first bit was sent and read at the same time, what message did you receive instead?

AABB

A binary message was recorded as a wave as shown in the image below. Can you decode the message? Explain what information you would need in order to successfully decode the message into A's and B's. Graph: Starts at a, goes up to b for a longer time, down to a for the same longer time, up to a for an even longer time

ABBAABBB

CSV

Abbreviation of "comma-separated values," this is a widely-used format for storing data

Understand why a function is an example of an abstraction.

Abstraction is the practice of temporarily forgetting details unnecessary to addressing the problem at hand. Defining and calling functions is another example of how computer scientists use abstraction to solve problems. Once you have written a function that you know works as intended, you can call the function as often as you wish, without worrying about the details or problems you had to solve to get it working. Defining functions is an example of how computer scientists use abstraction to solve problems. A programmer will design a solution to a small, well-defined portion of the task and then give a name to the associated code. Whenever that problem arises again, the programmer can invoke the new function by name, without having to solve the problem again. This ability to refer to complex functionality by simple, meaningful names allows for programs to be written in more intuitive ways that reflect the relationships between different blocks of code.

Why is abstraction important with regards to the internet?

Abstraction plays a key role in the relationship between the layers of the Internet, as higher levels make use of the functionality provided by lower levels, without worrying about how they function.

ASCII

American Standard Code for Information Interchange. ASCII is the universally recognized raw text format that any computer can understand

How does an API manage complexity in a program? And how is it an example of Abstraction?

An API is a reference guide which catalogs and explains the functionality of a programming language. If a programmer develops the practice of referencing an API, she can make full use of that functionality without undergoing the tedium of memorizing every detail of the language. WHY IT IS AN ABSTRACTION:

Any encryption cipher is an algorithm for transforming plaintext into ciphertext. What about the other way around? Can you write out an algorithm for cracking a Ceasar cipher? What about a random substitution cipher?

An algorithm for cracking a Caesar cipher is pretty easy - for each possible alphabetic shift, try it, see if the words come out as english. An algorithm for cracking random substitution is trickier and more nunanced. There might not be a single great answer but through thinking about it you realize how tricky it is to codify human intelligence and intuition for doing something like frequency analysis into a process that a machine can follow. It probably requires some human intervention which is an interesting point to make.

Parameter

An extra piece of information that you pass to the function to customize it for a specific need.

Conditionals

Another term for if statements -- statements that only run under certain conditions.

What is an API?

Application Program Interface: A well-documented library of functions provided in a programming language that helps to simplify complex programming tasks

A single central register of IP addresses and names (a DNS style system) is an efficient means of translating human readable names to IP addresses. Which of the following is NOT solved by DNS? A. It is inefficient to have everyone on the Internet maintain their own list of IP addresses B. There are too few IP addresses to meet the current demand C. When someone new joins the Internet they must inform everyone else of the new IP address D. When and IP address changes, it is impossible to locate a computer until the owner announces the change

B. There are too few IP addresses to meet the current demand

What is a Caesar cipher? As part of your answer demonstrate encrypting the plaintext messages: CS IS COOL with a caesar cipher.

Caesar's Cipher is a technique that shifts the alphabet by some number of characters. For example, "CS IS COOL" may be encrypted by "FV LV FRRO".

Which of the following statements is the LEAST TRUE about personal data that technology companies potentially collect about their users?

Companies are required by law to give users options to personalize what data they collect about them

Was it difficult to crack a Random Substitution cipher? Did it take longer than you thought? shorter? Why?

Computational tools aid humans in the implementation of encryption, decryption, and cracking algorithms. In other words, using a computer changes the speed and complexity of the types of encryption we can do, but it also increases our ability to break or circumvent encryption.

Be able to translate color into RGB code.

DONE

Can analyze and check assumptions regarding data.

DONE

Convert from/from hexadecimal to binary or decimal

DONE

DOS

Denial of Service

Density of an image

Density is the number of pixels per a given area.

DDOS

Distributed Denial of Service

Copper Wire Radio Wave Fiber Optic Cable

Electric Voltage Alternating Frequencies Beam of Light

Explain and implement an event-driven program

Event-driven programs do not progress in a predictable order. User-generated events (e.g. mouse clicks, button press, key presses, etc.) are each handled individually by pieces of code, one per event. For example, you want to write code so that when a user clicks button1 something different happens from when they click button2. Event-driven programs like these are dynamic but also bring challenges since you don't know what order user-events might happen in. It can lead to unpredictable program execution and an associated set of challenges.

Debugging

Finding and fixing problems in your code or algorithm

How much easier is it to crack a caesar cipher than a random substitution cipher? Can you put a number on it?

For Caesar's Cipher there are only 25 possible ways to shift the alphabet. Worst case, you only need to try 25 different possibilites. A random substitution cipher has MANY more possibilities (26 factorial = 4x10 26 possibilities). However, as we learned, with frequency analysis we can avoid having to try all of them blindly.

How are functions with parameters an example of abstraction?

Functions with a parameter is an example of an abstraction for many reasons. For example, when having many similar problems, we tend to find a solution that is similar since they may display a pattern. Thus, we would be able to solve all the problems just by using one solution.

Which Internet Layers talk to each other?

HTTP & DNS: manage the sending and receiving of web files TCP/IP & Routing: Break down and transport packets Wires, Cables, & Wifi: binary sequences of 1's and 0's are send physically

HTTP is considered to be a high level protocol because:

HTTP requests make use of abstractions provided by lower level protocols

Able to determine what is considered computationally hard.

I CAN

Able to perform Mod arithmetic operation

I CAN

Applying Turtle commands to solve a problem.

I CAN

Applying naming conventions to improve programming

I CAN

Be able to create an algorithm

I CAN

Be able to create and interpret an algorithm

I CAN

Be able to solving issues in a code segment.

I CAN

How to research a topic and develop a quick understanding of it.

I CAN

To able to use functions to solve problems and reduce complexity.

I CAN

Correctly use strings and integers

I KNOW

What is the difference between IPv4 and IPv6

IPv4 has 32 bits designed 1973 adapted in 1980s IPv6 has 128 bits

IETF

Internet Engineering Task Force

Recall that in RFC 3271, "The Internet is for Everyone" Vint Cerf wrote the following. What did he mean by "cryptographic technology?" What does it mean to you now?

Internet is for everyone - but it won't be if its users cannot protect their privacy and the confidentiality of transactions conducted on the network. Let us dedicate ourselves to the proposition that cryptographic technology sufficient to protect privacy from unauthorized disclosure should be freely available, applicable and exportable.

example of binary question

Is the light on or off?

How do loops ( Iteration ) help manage complexity and how are they an example of abstraction.

Loops make a program easier to understand since one thing would represent several, possibly more complicated lines- focuses on important stuff. Loops minimizes texts which helps with clarity in a program. Its a form of abstraction because its repetition so a smaller thing is used to represent a bigger concept.

Historically it has been observed that computer processing speeds tend to double every two years. This is known as:

Moore's Law

What do nodes, edges and cost mean regarding MST?

Nodes: the vertex typically a circle with a label in it Edge: a line connecting to nodes Cost: a number on the edge that indicates something about it- typically a distance, time, or cost associated with the connection

Knowing what you know now about frequency analysis, would you feel comfortable sending your password over the Internet using a substitution cipher? Why or why not?

Possible Answer: No, because though a substitution cipher is difficult to solve, it can still be done. In addition, a password would not likely contain all the letters in the alphabet so it would already narrow down the choices of letters than can be chosen from.

What does "efficiency" mean when it comes to programming.

Possible Answers: Efficiency could be the time they take to run on a computer, the time or number of people they require to create, the number of resources they require to run, etc. Students will likely come up with others. We measured the efficiency of our programs in terms of lines of code, but there are other ways to think about efficiency when talking about code or programs that run on a computer.

Abstraction

Pulling out specific differences to make one solution work for multiple problems.

Sequencing

Putting commands in correct order so computers can read the commands. Ex: Line numbers are used as sequencing, and function calls are used in higher programs

Understand the relationship between file sizes and the impact it has on using that type of file.

RELATIONSHIP: The big difference in file size between .txt and .docx is due to the extensive formatting information included along with the actual text in .docx. IMPACT: if a plain text file is 5 bytes, then a word file would be about 21,969 bytes

Abstraction

Reducing information and detail to focus on essential characteristics

Why is refactoring your code important?

Refactoring is the process of changing the way we wrote old code in order to keep programs consistent and readable while incorporating new functionality. It is possible that refactoring code will not change the user's experience but will make the program easier to read and maintain. Refactoring is a useful process, but it can be time consuming and challenging. We'd ideally not refactor code very often but it is sometimes necessary. Good planning and design can help avoid refactoring. Good use of functions and an organized program means that at the very least we limit areas that need to be changed.

Abstraction

Removing unnecessary details to focus on the essential characteristics. To break problems up into separate parts which can then be solved separately and recombined to form a complete solution. To focus on and use something based only on what it does and without concern for how that functionality is accomplished.

What is an RFC?

Request For Comments

How does a router make the internet redundant?

Routers will either deliver a packet to its final destination or forward it to one of several other routers it is connected to. By monitoring current network conditions, a router can determine which of these will allow the packet to reach its destination fastest. There will often be redundant paths between two locations on the Internet, and so if one path is experiencing traffic or otherwise out of service, additional paths will be available. This redundancy makes the Internet more reliable and also helps the Internet to scale, accommodating new users (and routers!) as they are connected to the system.

Screen resolution

Screen resolution is the number of pixels and how they are arranged vertically and horizontally

Pixel

Short for "picture element" it is the fundamental unit of a digital image, typically a tiny square or dot which contains a single point of color of a larger image

Packets

Small chunks of information that have been carefully formed from larger chunks of information.

Top Down Design

a problem solving approach (also known as stepwise design) in which you break down a system to gain insight into the sub-systems that make it up.

What is the digital divide? Why is it important to understand or what are its implications?

The "digital divide" is the idea that not everyone has equal access to the internet. Demographics such as household income, level of education, race and ethnicity, age, geographic location, and community type can affect an individual's access to the internet. important so you don't make assumptions that are not valid to all

RGB color scheme range

The RGB color scheme is composed of red, green, and blue components that have a range of intensities from 0 to 255.

In the Internet Simulator, your router knows to send your message to a different router because:

The first 4 bits of the address specify the router number that your friend is on

What is the "key" to a Caesar Cipher that someone needs to know (or discover) to decrypt the message?

The number of characters to shift each letter in the alphabet.

Raw Data

The original data as it was collected

The Internet Protocol (IP)

The required structure of a packet to be sent on the internet

Pivot Table

The tool used by most spreadsheet programs to create a summary table

Many languages do not use the characters of U.S. English. Suppose you wanted to be able to encode the characters of every language on earth within a single protocol. Guess how many characters would need to be encoded and calculate the number of bits that would be required per character. Then discuss the benefits and drawbacks of using this single unified system.

There are more than 50,000 characters in the world; therefore, in order to represent each of these characters you would need 16 bits. Using 16 bits and this single unified system would propose benefits and drawbacks. Specifically, with one system people from all over the world be able to understand each other; however, drawbacks would include one character taking a lot of unnecessary bits which will take longer to send.

When a computer scientist uses the term "Big Data" what do they typically mean?

There is enough data that traditional data processing applications are inadequate.

event.key

Use event.key - from the event parameter of the onEvent callback function - to figure out which key was pressed

computationally hard

a problem that cannot be solved in a reasonable amount of time

Encryption

a process of encoding messages to keep them secret, so only "authorized" parties can read it.

Decryption

a process that reverses encryption, taking a secret message and reproducing the original plain text

Latency

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

Which of the following information is not necessary in your protocol to play battleship? Grid Coordinates, From, To, Time of Day

Time of Day

Iteration

To repeat in order to achieve, or get closer to, a desired goal. "loop" by another name - the repetition of a statement, process, or procedure. ex: "jump to line x" and if statements

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.

Bandwidth

Transmission capacity measure by bit rate

Event-driven program

a program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)

What is a data visualization and how are they used?

Visualization is about communication. The goal of any data visualization is to transform data into useful information. You choose to make a chart because you think it's a better or more effective way to communicate information than using raw data. Advantages: pictures allow you to compare things more easily, easier to see trends or patterns, can focus on, or highlight, particular aspects of the data that are important Disadvantages: easy to mislead or miscommunicate, removes details that might be important or valuable, sometimes very dense - takes a while to study to understand what it means.

Understand how images are represented as Pixels.

What we've discovered is that the data for our image file must contain more than just a 0 or 1 for every pixel. It must contain other data that describes the pixel data. Raster images store the image as an array of individual pixels, each of which has a particular color. Higher-quality images can be obtained by decreasing the size of the pixels (resolution). An important idea here is that images on computer screens are created with light by illuminating pixels on the screen. Width and height of an image is metadata-For example, a digital image may include metadata that describe the size of the image, number of colors, or resolution

What & how data is used to tell a story.

Your data is only as good as your ability to understand and communicate it, which is why choosing the right visualization is essential. When you start to work with your data, it's important to identify and understand the story you are trying to tell and the relationship you are looking to show. Knowing this information will help you select the proper visualization to best deliver your message. When analyzing data, search for patterns or interesting insights that can be a good starting place for finding your story.

What are examples of one-way functions.

[ADD MORE] How passwords work is a one-way function. The site will take in the password you typed into a function and during that function it will determine whether or not the password in correct through encryption. However, you can't reverse the function and type in the encrypted password to get the original correct password. It only works one way.

Turtle Programming

a classic method for learning programming with commands to control movement and drawing of an on-screen robot called a "turtle". The turtle hearkens back to early implementations in which children programmed a physical robot whose dome-like shape was reminiscent of a turtle.

Library

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

API

a collection of commands made available to a programmer

Number System

a collection of symbols and the rules for ordering them

Binary Number System

a collection of two symbols and the rules for ordering them

Lossless Compression

a data compression algorithm that allows the original data to be perfectly reconstructed from the compressed data.

Documentation

a description of the behavior of a command, function, library, API, etc.

How is abstraction important?

a mental tool that allows us to ignore low-level details when they are unnecessary ignore small details is what allows us to develop complex encodings and protocols. focus only on the most significant or relevant portions of a problem he ability to rely on high-level encodings and temporarily ignore lower-level details is the key to building the complex systems that we use and interact with every day.

Binary Message

a message that can only be one of two possible values

Heuristic

a problem solving approach (algorithm) to find a satisfactory solution where finding an optimal or exact solution is impractical or impossible.

Binary Question

a question to which there are only two possible answers

What is a Minimum Spanning Tree (MST) ?

a set of edges with the least total cost connecting to every node in a graph while not forming a cycle

Caesar Cipher

a technique for encryption that shifts the alphabet by some number of characters.

Frequency Analysis

a technique that is based on how frequently certain letters appear in English versus others

byte

a unit of information contains 8 bits.

What makes programming languages unique.

all programming languages are derived from the human need to concisely give instructions to a machine || we can use programming languages to express our ideas as algorithms, build new things, and solve problems.

DNS

an abbreviation for Domain Name System, the Internet's system for converting alphabetic names into numeric IP addresses.

cipher

another term for encrypted message

Describe how DNS work's?

associated a name to an IP address our computer uses DNS to look up domain names and get the associated IP address, used to connect computer to destination on the internet

How is broadcasting a packet different than routing a packet?

broadcasting: letting everyone know routing: only the intended person will know

What does it mean to clean data, why is it done and how is it done?

clean data is when the data is ready for analysis; Filtering and cleaning data is necessary to ensure that data is in a form that is better for computers to process; Small discrepancies in the data may prevent accurate interpretation of trends and patterns or can even make it impossible to use the data in computation in the first place. Cleaning data is therefore an important step in analyzing it, and in many contexts, it may actually take the largest amount of time.

At a high level how does DNS work?

computers ask to go to a link, DNS server of the computer does not the IP address it will ask around to find the IP address, once they find the IP address and will send it to the computer

What does IP not ensure?

does not ensure it safety/security

Can identify trends or patterns in data. HOW ARE TRENDS ADJUSTED?

done Trends adjusts search data to make comparisons between terms easier. Search results are proportionate to the time and location of a query. Each data point is divided by the total searches of the geography and time range it represents, to compare relative popularity. Otherwise places with the most search volume would always be ranked highest. The resulting numbers are then scaled on a range of 0 to 100 based on a topic's proportion to all searches on all topics. Different regions that show the same number of searches for a term will not always have the same total search volumes.

random substitution cipher

encryption in which arbitrary symbols replace letters

caesar cipher

encryption scheme based on shifting the alphabet

Vignere Cipher

encryption that shift the alphabet differently per character

What is the function of IP? How does it perform this function?

function: addressing system for computers on the internet to allow people send messages to others how it does it: each device is given an unique address

What is the function of the IETF, how does it function and who are its members?

function: defines the protocols and standards for how the Internet works member: anyone can be a member

What is the function of TCP? How does it perform this function?

function: verify if all the packets of a file is there how does it perform: once all packets are received to the destination TCP will check if all packets are there

Network Redundancy

having multiple backups to ensure reliability during cases of high usage or failure

What is the function of HTTP?

hypertext transfer protocol the language used to communicate between web browsers and servers

Why does order of parameters matter?

if you have a set of parameters, you need to make sure they are in the correct order to the right numbers represent the correct corresponding parameters

Boolean Expression

in programming, an expression that evaluates to True or False.

HTML

is the set of markup symbols or codes inserted in a file intended for display on a browser page. The markup tells the Web browser how to display a Web page's words and images for the user.

How is an IP address used on the Internet?

it is a unique address to each device on the network similar to like a mailing address. sends message and your IP address to another computer

Why are packets used to send messages over the Internet?

it will cut down a file into chunks of information so it can be sent

Determine the difference between Kilobytes, Megabytes, Gigabytes, Terabytes and Petabyte and convert between each unit

kilo-1024 mega-1,048,576 giga-1,073,741,824 tera-1,099,511,627,776 peta-1,125,899,906,842,624 --- 1 kilobyte = 1000 bytes 1 megabyte = 1000 kilobytes = 1,000,000 bytes 1 gigabyte = 1000 megabytes = 1,000,000,000 bytes

If you make an image darker is it a lossy or lossless transformation?

lossless because you can transform it back to its the original state

What is the difference between lossy and lossless compression

lossy- data is lost due to compression however it is not visible to the human eye losslesss- no data at all is lost after compression.

Why is the Vigenere cipher hard to crack? (select 2)

one cannot solve using frequency analysis directly the key length is variable and potentially very long

How is an IP address organized hierarchically?

organized by county/network, region/network, subnetwork, device

The digital divide is about how

people's access to computing and the internet differs based on socioeconomic or geographic characteristics

What impact does increasing the pixel size and number of pixels have on an image.

pixel size: affect density number of pixels: affect the resolution

Describe to a person who knows nothing about encryption why public key encryption is secure and is hard to crack.

possible answer: A public key encryption is secure and hard to crack because outsiders can only know the public key and having the private key is the only way to be capable of reading and understanding messages sent. The public key is a value that can be used to encrypt a message, however only when it is combined with a private key is when the message can be decrypted.

In symmetric encryption the same key is used to encrypt and decrypt a message. In asymmetric encryption different keys are used to encrypt and decrypt. Give at least one reason why asymmetric encryption is useful

possible answer: Asymmetric encryption is useful because it is more securing since it has 2 different keys; essentially, this allows other people to send information to a person with the private key while other people can't read those messages unless they have that private key.

Using the Vigenere cipher, does the length of the key matter? For example, if one key is length 5 and another is 20, does one produce a "better" encrypted message than the other, or is it basically the same? Yes or no? Explain your reasoning.

possible answer: In a Vignere cipher, length of the key does matter. For example a key with the length of 5 and 20, the one with the length of 20 would make a "better" encrypted message than the other because the harder the key taking in that it is a good one, the more encrypted the message would be making more combinations to crack.

What is the difference is between "cracking" a code and "decrypting" a message?

possible answer: The difference between cracking and decrypting messages is one(decrypting) uses a key to figure out the original message while the other(cracking) is similar to detective work because you are using various methods to figure out the message without any keys.

Explain in your own words what the modulo operation does. You may use the analogy of a clock in your answer if you like.

possible answer: The modulo operation finds the remainder of the 2 numbers. Basically, the number after the MOD is divided by the number in front; afterwards, it will have a remainder(if not the answer is 0) and that would be your answer.

In what situations on the Internet do you typically want to keep information secret? From whom do you want to keep it to be secret? How do you think your privacy is maintained on the Internet now?

possible answer: The situations on the Internet that you want to keep information as a secret is the cases that include your social security numbers and credit card numbers. You want to keep those things are secrets from people that might want to steal your identity. For example, you want to prevent a hacker from getting your bank account information so they don't steal all your money. Now, privacy is maintained on the Internet by being cautious which sites your are going to and not just giving your information randomly. In addition, it may likely be encrypted.

the number of beans alice chooses to put in the cup initially a sealed cup of beans that alive puts on the table bob adding beans to the cup alice dumping the beans out of the cup and counting off their original number

private key public key encrypting a message decrypting a messae

To improve communication in playing battleship on the Internet Simulator your group invented an

protocol

What does it mean to create a summary table and why is it done?

provide a way to visualize data; allow you to see things in the data you might otherwise not see; allow you to manipulate and create new data; helps you look at your data in new ways. A summary table can be a first step toward a good visualization.goes beyond filtering and sorting; we can use computing tools to create summary tables like this for us very quickly; most data manipulation tools, like spreadsheets, allow you to quickly group, categorize, count, and average things. Making a summary table is a computational technique for exploring the data.

Determine basic color of a RGB code. ( Red, Green, Blue, White and Black )

red: F00 green: 0F0 blue: 00F white: FFF black: 000

density vs resolution

resolution how many pixels can be seen on a screen, while density can show the same resolution on a computer and on a phone because of how close the pixels can become

Why is compression important.

saves time and space; One reason is that storage space is limited and you'd always prefer to use fewer bits if you could. A much more compelling reason is that there is an upper limit to how fast bits can be transmitted over the Internet; The art and science of compression is about figuring out how to represent the SAME DATA with FEWER BITS.

Can differentiate between a scatter, line, bar and pie chart.

scatter- dots line- connected lines bar- bars NO RANGES histograms- bar graphs with ranges pie-- circle

What is the purpose of DNS on the Internet?

so we don't have to remember all the IP addresses

Why is DNS Used?

so we don't have to remember the IP addresses

Private key

the complementary key to a public key that is used to decrypt a message.

What does fault tolerant and redundant mean with respect to the Internet?

the network can keep sending packets even if something goes horribly wrong redundant: because TCP keeps checking for all packets of a whole thing to be there and will send it once all packets are there

HTTP

the protocol used by the World Wide Web. It describes how messages are formatted and interchanged, and how web servers respond to commands.

LOCAL VARIABLES

Variables created within a function become local to the function. Local variables have local scope: they can only be accessed within the function. In the example to the right we say that age is "local to" someFunction which means that only code within someFunction can access and modify the value age. Code that's outside this function cannot see or use the variable. In fact, local variables are created when a function starts, and destroyed when the function is completed. Local variables only exist for the life of one function call. -temporary placeholders for data that you need to perform a computation of some kind -only recognized inside their function, variables with the same name can be reused in different functions -function parameters are a form of local variables- they get created and initialized when a function is called they get used while the function runs and then they get destroyed when the function completes == COMMON PITFALLS -The most common mistake is something you just experienced: accidentally re-creating a variable inside a function when you intended to reference a global variable. -When you create a variable inside a function, and it happens to have the same name as a global variable, the local variable takes precedence and the function will try to use the local variable first.

Utilize and understand arrrays

Variables store single pieces of information, while arrays store many. An array can grow in size to accommodate more information. Arrays are slightly more complex to use than variables. If you are only going to be storing a small and fixed amount of information, it is probably appropriate to use multiple variables. A list allows large amounts of information to be easily referenced and passed around a program, and the use of a numeric index allows individual items in a list to be accessed

Where is your personal data being tracked and what issues might this create

WHERE:making connections in this data or to other sources of data makes it possible to form a more complete picture of who we are/what we do ISSUES: raises security and privacy concerns; personal data is lost fairly regularly, can be used to steal money or identities, get access to classified information, blackmail people, etc

Why is encryption important over the internet?

We use encryption everyday on the Internet, primarily to conduct commercial transactions, and without it our economy might grind to a halt.

In general, when do you think you should store information in an array, and when should you use a variable?

When wanting to create a list or storing data that is similar, an array would be a better. If you are storing a single item or items for one time use, a variable would be more convenient.

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.

How is public key encryption secure?

it uses an asymmetric encryption scheme in which the encryption key is made public, but the decryption key is kept private

What issues surround big data.

large scale data breaches mean that the details of our personal, professional, and financial lives may be at risk. constant risk to our collective security and privacy

How is the length of a key important?

possible answer: more combinations to try and test Simple substitution ciphers give insight into encryption algorithms, but as we've seen fall way short when a potential adversary is aided with computational tools...our understanding must become more sophisticated.

Cipher

the generic term for a technique (or algorithm) that performs encryption

Modulo ( Mod)

the name of the mathematical operation. Modulo gives the remainder from dividing two numbers. For example: 17 MOD 13 is 4.

Moore's Law

the observation that computing power roughly doubles every two years.

Concatenate

to link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)

if Statement

The common programming structure that implements "conditional statements".

What is a one-way function?

The function only takes input. You can only put in information into the function, and you can not reverse the function. The modulo operation is important for cryptography because it can act as a one-way function - the output obscures the input.

Random Substitution

an encoding technique that maps each letter of the alphabet randomly to different letters or characters.

key event

an event triggered by pressing or releasing a key on the keyboard; for example: "keyup" and "keydown" are event types you can specify. Use event.key - from the "event" parameter of the onEvent callback function - to figure out which key was pressed.

Event handling

an overarching term for the coding tasks involved in making your app respond to events by triggering functions.

LABELS

can act a lot like buttons, only they can't have text or a background color.

LABELS

can have a background color, but are designed to be filled with more text.

Variable Scope

dictates what portions of the code can "see" or use a variable, typically derived from where the variable was first created. (See Global v. Local)

keydown

event type triggered when key is pressed down on the keyboard

keyup

event type triggered when key is released on the keyboard

Local Variable

A variable with local scope is one 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.

IF ELSE IF: the order of the conditions matters!

-An if-else-if will to execute the code for the first condition that comes up true -- all other conditions will be ignored. -An if-else-if statement is like saying, "FIRST check this condition, THEN check this one, THEN check this one and so on. -The common mistake is to accidentally have a condition early in the sequence that makes the other statements impossible to reach. === -conditions are read from top to bottom -Without a final else clause it's possible that the whole structure can be skipped

Utilize and understand turtle commands

-If-statements exist so that your program can adapt, respond, or make choices about whether or not to execute certain portions of code based on some condition that you check while the program is executing. -because it involves checking conditions, these statements are sometimes called conditional statements, or sometimes just conditionals. -A conditional statement (if-statement) requires a conditional expression, something that is either true or false and it's what an if-statement uses to decide whether or not to execute a certain portion of code. -A generic term used by the AP CSP Framework for this is Selection. As in: your program can select whether or not to run certain blocks of code. -There are two main issues to concern yourself with when it comes to if-statements and today we've looked a lot at one of them, namely, program flow and order of execution. -For example, one very common misconception, or place where people get tripped up is, in the difference between a sequence of if-statements, and using an if-else statement.

Why is asymmetric encryption with regard to the internet?

-It's a big deal that asymmetric encryption allows for two parties to send secret messages to each other over public channels without having to agree on a secret encryption key ahead of time. -Until asymmetric encryption was invented, the only way to ensure secure transactions on the Internet was to establish a shared private key, or to use a third party to guarantee security.

Utilize and understand for loops in programs

-The for loop consolidates all of those pieces - counter variable, incrementing, and boolean condition - onto one line. -One of the most common uses of for loops in programming is to process arrays. for loops allow programmers to easily step through all the elements in an array. -This basic pattern is at the core of many algorithms used to process a list of items

SCREEN

-a UI element that contains other UI elements, only one screen can be visible at a time, only elements that "belong" to a screen will visible when that screen is active, multiple screens, but only one coding workspace[even though your design elements might be spread across multiple screens, your code does not get broken up like that, there is only one coding workspace, that will still house all of your code for the app], A screen is just a convenient way to show and hide certain UI elements, Every program you write in App Lab could be done without screens by simply being clever about what elements show and hide at any given time, But programs like that are very difficult and annoying to write. So the concept of a "screen" makes the UI much easier to design. -SCREEN have IDs and you can use onEvent with them but they don't quite fit the mould because they have the special property that if you use onEvent with a screen, it will capture every event of the type you specify regardless of whatever other elements are clicked on.

Use boolean expression to make decisions

-boolean value is simply a computer science-y term that means a true/false value. -boolean expression is a statement that evaluates to a Boolean value (a single true/false). -"Conditional" is simply a generic term for code that alters program flow based on true/false values (like an if statement) -&&, ||, ! are boolean expressions

Utilize and understand while loops in programs

-most primitive type of loop -repeat a set of steps until a certain condition is met. Thus, like conditional statements, while loops use boolean expressions to determine if they will run and how many times. -One of the biggest problems a programmer can run into with a while loop is to create an infinite loop -It repeats a set of commands. It continues to run "while" a boolean expression is true. -It is called a loop because it "loops through" a set of commands. -They may mention that visually it looks like a loop when shown in a flowchart. -Things to pay attention to when programming while loops: Something inside the while loop has to update the variable in the condition so the while loop will stop; while loops may never run if the condition begins as false; while loops can become infinite if the condition never becomes false; Off-by-one errors are common with while loops

What is the impact of Moore's Law?

-puts a name to a description of how fast computing capacity grows -has encouraged industries that use computer to effectively plan future research and development based on anticipated increases in computing power -forces us humans to be away of this and help us plan for it

Read a flowchart and implement code from it

A flow chart is a common visual that's used to represent the various paths of execution that your program might take. Many people use them to help plan. 1. This flow chart depicts a program executing one line after another until it gets to a point where it needs to make a decision. 2. In order to determine which path to take you state some condition. It should be a Boolean expression - something that evaluates to true or false. 3. The program does one thing if the condition is true, and something else if the condition is false. 4. The program can continue a single thread of execution after the condition as well. === -Events are setup by a programmer, but triggered by the computer at any momement in time. -If statements are a way a programmer can have her code make a decision during the normal flow of execution to do one thing or another. -What made it hard was that you needed to check more than one condition at the same time. You needed to say "it's saturday OR sunday". That's more than one condition to check. -So a solution (using only what we know so far) is to nest if-statements. -Nesting if statements is one way to check more than one condition at a time.

Why would we prefer to write a function that returns a value to using the strategy shown above? How might return values make our function more generally useful? How might they make our code easier to reason about?

A function that saves output in a global variable must specifically reference that variable by name. Since that name is "hard-coded," your function can only ever save information in that variable. If we wish for our functions to be generally useful, we should be able to decide how to use the output a function generates. A global variable is accessible by all functions. As a result, it can be difficult to determine every location in your program that modifies this variable. Reasoning about how its value will change over the course of the program is much harder, as is debugging unexpected behavior. Using a return value limits the effects of a function to the local variables of the function and the place where the function was called.

Which of the following statements about debugging and program errors is FALSE? -Error messages help programmers identify problems in their code. -Not all errors in a program will generate an error message. -Debugging is the process of locating and correcting errors in a program. -It is common for programs to contain errors the first time they are written. -A program that does not generate any error messages can be assumed to run as intended.jeyup

A program that does not generate any error messages can be assumed to run as intended.

for loop

A typical looping construct designed to make it easy to repeat a section of code using a counter variable. The for loop combines the creation of a variable, a boolean looping condition, and an update to the variable in one statement.

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. For example 7+5 is interpreted differently from "7"+"5"

String

Any sequence of characters between quotation marks (ex: "hello", "42", "this is a string!").

Expression

Any valid unit of code that resolves to a single value. (Variables can be assigned values that are the result of an expression.)

Create and implement functions in order to increase the abstraction of a program

Applying Abstractions - integrates math and logical concepts and manages complexity -The chain of function calls shown above is a perfect example of both integrating mathematical/logical concepts and mananging complexity. -The checkCorrect(id) function in itself is a good example, since reading the contents of that function, you see how the much of the problem was broken down (aka 'abstracted') into smaller parts -Furthermore the move to make checkCorrect(id) have a parameter that represents the thing to check helps to manage complexity because it meant we could just call a single function from the button click event handlers, only supplying a different value for the parameter with each call. -There are many other examples within the code - pick any function, explain what it does, and how it made writing the program easier or more tractable.

Create, implement, and debug algorithms

Applying Algorithms - Algorithm integrates new or known alogorithms, uses math/logical concepts -Simple algorithm: generating a color that's slightly different by adding small amount to each of the RGB values -Updating the score based on whose turn it is requires applying logical concepts. -End-of-game condition requires applying logical -concepts -The chain of function calls triggered from a button click is an algorithm - "Click" -> checkCorrect() -> updateScore() -> checkEndGame() -> newGameBoard() -> switchPlayers(). Each of these functions represents a step of the algorithm that incorporates some other small piece of logic.

Utilize standards techniques to debug a program

Debugging is part of the problem-solving process of programming. -Rarely does code work exactly the way you want the first time. -If you write some code and need to work out a few bugs that does not mean you are bad programmer - actually the opposite might be true. === Error messages are how the computer gives you a helping hand in writing your program, and often they'll include helpful information about how you can fix your code. this process of finding and fixing errors in your code is entirely normal and is just as important a skill as writing the code in the first place. === TECHNIQUES: -Printing messages to the console is just about the fastest and easiest way to immediately see output from a running program. -Using well-placed console.log statements is very useful technique for figuring out things like the order in which things are happening, a value or state of something at various points in the program during execution, or whether an event is firing or not, and when.

What is the difference between cracking and decrypting a message?

Decrypting is just using an algorithm to undo the encryption. It's like using a key to unlock a lock. It's what the sender is expecting the intended recipient to do to recover the original message. Cracking is more like detective work - it's like trying to pick a lock - using various methods to try to figure out what the secret message is without having or knowing the decryption "key" ahead of time.

Utilize and understand variables in programs

IDs are case sensitive, cannot contain spaces, must begin with a letter and may be followed by any numbers of digits and letters, and can contain hyphens, underscores, colons or periods === -The = sign in programming is an instruction to store a value in memory, NOT a statement of equality. -"Variables" in computer programming are just named pieces of memory, NOT unknowns in an equation or symbols for undetermined values.

Variable

In JavaScript (and most programming languages) the most primitive type of memory you can use is called a variable. It's called a variable because it's a piece of memory in which you can change what's stored - its value can vary. -To create a chunk of memory to use in a program you use the var command. -To assign a value to a variable means to store a value in memory; you use the = operator. -Variable re-assignment typically means to change the value of a variable based on its current value.

Understand the differences between strings and integers

STRINGS: -a feature of essentially every programming language, and they allow for variable-length pieces of text to be represented, stored, and manipulated INTEGERS: -typically stored in fixed-width 8-, 16-, 32-, or 64-bit chunks === ASCII characters require a single byte and so a string of 100 characters, short by most standards, would require 800 bits in order to be stored in memory.

Why is it important to keep information secret?

Secrecy is a critical part of our lives, in ways big and small. As our lives increasingly are conducted on the Internet, we want to be sure we can maintain the privacy of our information and control who has access to privileged information. The need for secrecy when sending bits over the Internet is important for anyone using the Internet.

User Interface (UI)

The "User Interface" or UI of an app refers to how a person (user) interacts with the computer or app.

What does a key mean when talking about encryption?

The "strength" of encryption is related to how easy it is to crack a message, assuming adversary knows the technique but not the exact "key"

How is Modulo a one-way function?

The modulo operation is important for cryptography because it can act as a one-way function - the output obscures (keeps from being scene) inputs that are very large numbers.

Your app needs to store the following information. For each type of information, decide whether you would use an array or a variable to store it: All the messages a user has sent The highest score a user has ever reached on the app A username and password to unlock the app

You would use an array to store all the messages a user sent; however, to store the highest score a use has reached and a password/username a variable would be a better choice.

What are the characteristics of a good password?

[CHECK] length; combination of special characters, numbers, and letters

What is meant by the term "Cost of Free"

[CHECK] there are some of the tradeoffs between maintaining personal privacy and using innovative software free of cost

LOGIC errors

[computer doesn't report anything at all] -The program runs but doesn't do what you think it should. -Can be tricky to fix because there might not be an error message -Fix by retracing your steps, being humble, and trying to understand why the computer is interpreting what you wrote the way it is.

SYNTAX errors

[easier to solve than logic; computer doesn't understand, so easy for one to spot] - Things you misspelled or wrote in such a way the computer doesn't understand what you're trying to say - Usually, the computer spits out an error message of some kind that is a clue about what it can't understand -Fix these with careful reading of the lines that have errors

Computationally hard

a "hard' problem for a computer is one in which it cannot arrive at a solution in a reasonable amount of time.

Big Data

a broad term for datasets so large or complex that traditional data processing applications are inadequate.

Event listener

a command (onEvent in App Lab) that can be set up to trigger a function when a particular type of event occurs on a particular UI element.

return

a command used to end execution of a function and resume execution at the point where the function was called.

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.

Vigenere cipher

a method of encrypting text by applying a series of Caesar ciphers based on the letters of a keyword.

models and simulations

a program which replicates or mimics key features of a real world event in order to investigate its behavior without the cost, time, or danger of running an experiment in real life.

while loop

a programming construct used to repeat a set of commands while a Boolean conditions is true

Asymmetric encryption

a type of cryptographic based on algorithms that require two keys -- one of which is secret (or private) and one of which is public (freely known to others).

Canvas

a user interface element to use in HTML/JavaScript which acts as a digital canvas, allowing the programmatic drawing and manipulation of pixels, basic shapes, figures and images.

Public key

a value that can be used to encrypt a message. However, only when combined with a mathematically-related private key, can the message be decrypted.

Utilize and understand the various UI elements

everything in the design mode(ie buttons, images, text boxes, pull-down menus, screens, canvas) SCREEN: a UI element that contains other UI elements, only one screen can be visible at a time, only elements that "belong" to a screen will visible when that screen is active, multiple screens, but only one coding workspace[even though your design elements might be spread across multiple screens, your code does not get broken up like that, there is only one coding workspace, that will still house all of your code for the app], A screen is just a convenient way to show and hide certain UI elements, Every program you write in App Lab could be done without screens by simply being clever about what elements show and hide at any given time, But programs like that are very difficult and annoying to write. So the concept of a "screen" makes the UI much easier to design. LABELS can have a background color, but are designed to be filled with more text. BUTTONS have a default styling (green button) that changes slightly in color when you click it. But buttons can also have a background image and background color at the same time which is convenient if your image is an icon (red thumbsup). IMAGES can act a lot like buttons, only they can't have text or a background color. SCREEN have IDs and you can use onEvent with them but they don't quite fit the mould because they have the special property that if you use onEvent with a screen, it will capture every event of the type you specify regardless of whatever other elements are clicked on.

Using the return statement with a function

guidelines: Decide what values you need as input to your computation. Make these parameters of your function. Use your parameters to calculate your result and save that result in a single variable. Return that variable on the last line of your function. === When you use return you are also able to specify a single value that will be "returned" to whatever code called the function in the first place. The effect is that the function acts like any expression that evaluates to a single value. === Return values are a useful way to move useful information generated inside of a function to the rest of your program. There is another way we can do this. If we write our function so that it stores its output within a global variable, then that information will be accessible when the function terminates, since the global variable will stay in scope.

BUTTONS

have a default styling (green button) that changes slightly in color when you click it. But buttons can also have a background image and background color at the same time which is convenient if your image is an icon (red thumbsup).


Kaugnay na mga set ng pag-aaral

Quiz: Identifying the substance of the gene

View Set

Unit 1 Module 3 cont.:Stages of Psychosocial Development

View Set

Chap 3: The Accounting Information System

View Set

Data Science Interview Questions

View Set

AP psych Unit 5: States of Consciousness

View Set

The second Amendment and the Right to Bear Arms

View Set