CourseNotes
Published on CourseNotes (https://course-notes.org)

Home > AP CSP Unit 5 Flashcards

AP CSP Unit 5 Flashcards

Terms : Hide Images [1]
6432296318==(sometimes read: "equal equal") equality operator; used to compare two values, and returns a Boolean (true/false). Avoid confusion with the assignment operator "=",0
6432296319Global VariableA 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.1
6432296320If StatementThe common programming structure that implements "conditional statements".2
6432296321Local VariableA 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.3
6432296322Variable Scopedictates what portions of the code can "see" or use a variable, typically derived from where the variable was first created. (See Global v. Local)4
6432296323Callback functiona 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.5
6432296324EventAn action that causes something to happen.6
6432296325Event driven programa program designed to run blocks of code or functions in response to specified events (e.g. a mouse click)7
6432296326Event handlingan overarching term for the coding tasks involved in making a program respond to events by triggering functions.8
6432296327Event listenera command that can be setup to trigger a function when a particular type of event occurs on a particular UI element.9
6432296328UI Elementsonscreen objects, like buttons, images, text boxes, pull down menus, screens and so on.10
6432296329User InterfaceThe visual elements of an program through which a user controls or communications the application. Often abbreviated UI.11
6432296330Data Type(ex: Number, Boolean, or String) a value's property that dictates how the computer will interpret it. For example 7+5 is interpreted differently from "7"+"5"12
6432296331ExpressionAny valid unit of code that resolves to a value.13
6432296332VariableA placeholder for a piece of information that can change.14
6432296333DebuggingFinding and fixing problems in your algorithm or program.15
6432296334setPosition(id, x, y, width, height)Positions an element at an x,y screen coordinate, and optionally sets a new width and height for the element.16
6432296335setSize(id, width, height)Sets the width and height for the UI element.17
6432296336onEvent(id, type, function(event) { ... });event listener for App Studio18
6432296337setScreen(screenId)Sets the screen to the given screenId.19
6432296338console.log(message)Displays a string and/or variable values in the debug console in App Lab.20
6432296339write(text)Displays a string and/or variable values to the app screen.21
6432296340var x = promptNum("Enter a value");Declares a variable and prompts the user for its initial numeric value.22
6432296341x = __;Assigns a value to a previously declared variable.23
6432296342var x = "__";Declares a variable and initializes it with text.24
6432296343setText(id, text)Sets the text for the specified screen element.25
6432296344conditionalsstatements that run under only certain conditions26
6432296345if-statementsthe common programming structure that implements conditionals27
6432296346selectionA 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.28
6432296347Booleana single value of either TRUE or FALSE29
6432296348Boolean Expressionin programming, an expression that evaluates to True or False.30
6432296349&&"and" logical operator31
6432296350||"or" logical operator32
6432296351!"not" logical operator33
6432301495/ngo print this in the next line34
6432311669/bbackspace35
6432317531/ttab36
6432422935Concatentateto link together or join. Typically used when joining together text Strings in programming (e.g. "Hello, "+name)37
Powered by Quizlet.com [2]

Source URL:https://course-notes.org/flashcards/ap_csp_unit_5_flashcards

Links
[1] https://course-notes.org/javascript%3Avoid%280%29%3B [2] http://quizlet.com/