AP Computer Science

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

Byte

8 bits. This is the standard "chunk" of binary digits and can hold values of 0-255. Ex. 01101111

Or

A Boolean operator that joins two Boolean expressions wherein only one of the expressions needs to be true for the whole thing to be true. Ex. hasGoodgrades OR hasPerffectattendance would be true even if I only had good grades.

Compound Boolean

A boolean expression that is made up of one or more Booleans, combined with AND or OR. Ex. ≥65= Senior Citizen AND ≥65=Senior Discount

And

A boolean operator that joins two Boolean expressions wherein both ecpressions must evaluate to true for the whole statement to be true. Ex. hasGoodgrades and hasPerfectattendance would be true if I had both.

Operator

A character that represents an action or procedure. Ex. In language arts a . indicates the end of the sentence.

Else If

A conditional statement that runs a different set of statements depending on whether an expression is true or false. This statement must go below the if statement's block of code and is only checked if the if statement does not evaluate to true. Ex: if age ≥65 {display "Senior Citizen" else if age ≤64 {display "non-senior Citizen"}

Pseudocode

A detailed yet readable description of what a computer program or algorithm must do, expressed in a formally-styled natural language ("normal human words") rather than in a programming language. Ex. 1) Model shows sedentary clouds. 2) If there are winds present, model moves clouds in detected direction of wind.

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.

Nested Loop

A loop inside the body of another loop.

Random Number Generator (RNG)

A mathematical construct, either computational or as a hardware device, that is designed to generate a random set of numbers that should not display ant distinguishable patterns in their appearance or generation, hence the word random. Some RNGs are inclusive and some are exclusive. Ex. a RNG would return me a random number between 1-100 if specified.

Variable (2)

A placeholder for a piece of information that can change.

If

A programming conditional statement that, if proved true, performs a function or displays information. Ex. if age ≥65 {display "Senior Citizen"}

Order of Operations

A set of rules specifying which procedures should be performed first in a mathematical expression. Ex. In PEMDAS, anything in parenthesis goes first in the operations.

Float

A type of variable that can hold data in the form of decimal numbers. Named because the decimal can "float" around the number to any place value. Ex: 11.0802

Int

A type of variable that can hold numeric data only in the form of whole numbers. Ex. 11, 8, 2

String

A type of variable that holds a "string" of characters. In most languages, Strings have to go inside the quotation marks. The location of each character in a string is referred to as Index, with the first character being at index 0. Ex. "Alen"

Variable (1)

A value that can be stored in a computer program, but can also be changed/updated as needed. Ex. The CP of my Pokemon in Pokemon GO.

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"

Nested Conditionals

An If statement as the 'then' or 'else' statement of another conditional

Boolean

An expression that evaulates to ture or false or a datatype that stores one of two values: True or False. Ex. 11=8 is false

Expression

Any valid unit of code that resolves to a value.

Hexadecimal

Base 16. This number system takes up less space because it uses 16 digits instead of 10. 0-9 are "normal", while 10 is represented by "A", 11 by "B", 12 by "C", 13 by "D", 14 by "E", 15 by "F". Ex. 6D or 4B

Binary

Base-2. A number system with two digits: 0 and 1. This is the language of computers and all programming translate to binary eventually. A "1" means an electrical signal is turned on and a "0" indicates a electrical signal is turned off. Ex. 01100001

For Loop

Executes a block of statements a certain number of times depending on the initialization expression, conditional expression, and increment expression.

While loop

Executes a block of statements while the specified condition is true.

Conditionals

Features of a programming language, which perform different computations or actions depending on whether a programmer-specific boolean condition evaluates to be true or false. Ex. if isYawning {go to bed},

Logic Gate

It is an electronic circuit having one or more than one input and only one output. Ex. Two true inputs would produce a true output.

Modeling

Making a computer program to simulate what might or did happen in a situation. Ex. A computer program that can show and identify where a storm is going.

Sequencing

Putting commands in correct order so computers can read the commands.

Iteration

Repetition

NOT

Returns the opposite of whatever a Boolean expression evaluates to. Ex. 11=8 would be true since eleven doesn't equal eight

Simulation

Running a computer program (model) to observe the outcome, often by adjusting certain parameters (variables) in it. Ex. Running the weather model and observing where the storm will go if the winds are NW.

Bit

Short for binary digit. A single "0" or "1" Ex. 1

Max

Short for maximum. Used in programming to find the largest possible number for a datatype or the smallest number in a set of data. Ex. max(1,2,3,4) would be 4

Min

Short for minimum. Used in programming to find the smallest possible number for a datatype or the smallest number in a set of data. Ex. min(1,2,3,4) would be 1

Abstraction

Simplifications that hide details and gives us the ability to talk about problems at a higher (or more abstract) level without worrying about the "little stuff" Ex. The weather model doesn't include what the phase of the moon is.

Efficiency

The "cost" of computer program or algorithm in terms of time (speed), memory space, or even money, especially compared to other programs or algorithms. Ex. Using the weather model is more efficient than going outside and waiting for what the weather is like. It saves on time, money and saves you from possible heat stroke or hypothermia.

Concatenation

The operation of joining two strings together, using the + operator. Ex. 2+2+2+74

Assingment

The process of setting a variable's value. In Python, JavaScript, Lilypad Arduino, and most other languages, an assignment is indicated by a single = sign. Ex. cost= "100"

Else

The set of statements you want to run should the if statement and all else if statements evaluate to false. Ex. else {display "YOU ARE NOT ALIVE"}

Base

The term for the number of digits in a number system. Ex. Base 5 has 5, 10, 15, 20, 25 etc...

Decrement

To decrease by one. Often followed by two - operators. Ex. apple = 5; apple --; 3 apple

Increment

To increase by one. Often indicated with a varioavle followed by two + operators. Ex. year = 2019; year++; year is now 2020

Inclusive

Usually used for random number generators in programming. Means including the endpoints of an interval. For example, "Return a random number 1 to 4, inclusive" could return and 1, 2, 3, or 4

Exclusive

Usually used for random number generators in programming. Means it does not include [excludes] the endpoints of an interval. For example, "Return a random number 1 to 4, exclusive" would return either a 2 or 3 since 1 and 4 are not included [excluded].

Heuristic

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

Event-driven program

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

Loop

a programming construct that repeats a group of commands.

Algorithm

a step-by-step procedure for solving a problem

Event handling

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


Set pelajaran terkait

Personal Career Development Ch. 1

View Set

Managing Organizations and Leading People

View Set

Lesson 13: Age Discrimination in Age Employment Act (ADEA)

View Set

Managerial Accounting Chapter 18 Quiz 1

View Set

Early Childhood Education Food & Nutrition

View Set