Chapt 6 Flashcards
binary numbers can have the values of _____ or ______
0 or 1
hexadecimal uses what numbers and letters?
0-9 and A-F
what is the data notational system that contains only English letters, numbers and symbols?
ASCII
if you need a notational system that has non-english letters, what do you need to use?
unicode
which data type represents a single letter or number?
char
which data type represents several letters or numbers?
string
which data type indicates a number with no decimal places?
integer
which data type indicates a number with decimal places?
float
a boolean data type represents which two values?
true or false
name three types of interpreted languages
scripted, scripting, markup
what are two examples of markup languages?
html, xml
what type of high level language is read line by line every time it’s executed?
interpreted
which programming language category is used to write scripts?
scripting
programming languages that are converted a single time into low-level code are called what?
compiled languages
what type of programming language is designed to pull data from a database?
query
what is the low level programming language best suited for direct hardware access?
assembly
code that is for people to read and does not affect a program is called what?
comments or pseudo code
to map out a program, you would use a(n) ___________?
flow chart
which programming logic component uses if and else if statements?
branching
which program logic component uses while statements?
looping
in programming, what are the two types of data identifiers?
variables and constants
which type of programming data identifier does not change?
constant
which type of programming data identifier can change?
variable
what are the two types of data containers in programming?
arrays and vectors
which type of data container is fixed in length?
array
which type of data container can hold only one data type at a time?
array
which type of data container can have dynamically adjusted length?
vector
which type of data container can store multiple data types at once?
vector
which two programming concepts are used to break code into smaller, reusable chunks?
function and methods
the three characteristics of an object in programming are what?
properties, attributes and methods
what are some examples of object-oriented programming languages?
c++, python, c#, java, php, perl, ruby
flowcharts depict which one of the following?
objects, programs, identifiers, functions
programs
interpret the following logic. for data input on someone who is 20yrs old, which category will they fall into?
if age<13, then category “child”
else if age<20, then category “teen”
else if age<65, then category “adult”
else category “senior”
teen, child, senior, adult
adult
a cop has recieved data indicating there are 10 current threats to public safety. what should the threat level be?
if threats < 3, then level “green”
else if threats < 6, then level “yellow”
else if threats < 9, then level “orange”
else if threats < 12, then level “red”
else level “emergency”
orange, red, yellow, green, emergency
red
which of the following is an example of a markup language?
java, python, XML, SQL
XML
which of the following are examples of interpreted languages? choose two:
compiled, markup, scripted, query
markup and scripted
a program shows the number 11010.11 which data type is this?
float, integer, boolean, binary
float
you want to understand the sequence of a program, from start to finish. which of the following is best to use for this purpose?
object, pseudocode, function, flowchart
flowchart
a programmer is writing a program that needs to accept an input of someone’s name. what type of variable should the programmer create?
char, string, float, unicode
string
you have created an array that can hold 15 items, all of the integer data type. you want to add a 16th integer. which of the following is best to approach doing this?
a) add it to the existing array
b) create a vector and replace the array with it.
c) convert the integers to floats and add the 16th integer
d) create a separate variable for the 16th integer
b) create a vector and replace the array with it.
which of the following statements is true regarding arrays and vectors?
a) arrays can have multiple data types and are fixed in length. vectors have one data type and are dynamic in length.
b) arrays can have multiple data types and are dynamic in length. vectors have one data type and are fixed in length.
c) arrays contain one data type and are fixed in length. vectors can have multiple data types and are dynamic in length.
d) arrays contain one data type and are dynamic in length. vectors can have multiple data types and are fixed in length.
c) arrays contain one data type and are fixed in length. vectors can have multiple data types and are dynamic in length.
what high level programming language is translated into machine code once and then executed many times?
compiled, scripted, scripting, markup
compiled
which of the following are examples of object oriented programming languages? choose two:
python, C, SQL, java
java and python
in object oriented programming, which of the following are integral parts of objects? choose two:
variables, attributes, properties, arrays
properties and attributes
what type of programming language is designed to retrieve data from a database?
interpreted, assembly, query, compiled
query
which of the following programming language types is the lowest-level language?
interpreted, assembly, query, compiled
assembly
which of the following numbers is written in hexadecimal format? choose two:
3268, 18AF, 100101.11, 100101
3268, 18AF
a programmer wants to write code that directly accesses the computer’s hardware. which is the best type of language for the programmer to use?
compiled, query, interpreted, assembly
assembly
a developer needs to use a code designation for non-English letters. which notation system does the developer need to use?
international, unicode, ascii, strings
unicode
looping logic makes use of which of the following statements?
loop, if, while, when
while
which of the following terms describe concepts related to breaking code into smaller, repeatable sections? choose two:
variables, constants, methods, objects, functions
methods and functions
needs a command interpreter to be built into the program
assembly, markup, scripted, compiled, interpreted, scripting
scripted
reads the source code line by line and generates error if written incorrectly
assembly, markup, scripted, compiled, interpreted, scripting
interpreted
allows the developer to provide instructions directly to the hardware
assembly, markup, scripted, compiled, interpreted, scripting
assembly
translates the source code into machine code
assembly, markup, scripted, compiled, interpreted, scripting
compiled
annotates text to tell how to process or manipulate the text
assembly, markup, scripted, compiled, interpreted, scripting
markup
executes a list of tasks and supports the use of objects, variables and functions
assembly, markup, scripted, compiled, interpreted, scripting
scripting
convert 145 base 10 to binary
10010001
convert 122 base 10 to octa base 8:
172
convert 169 base 10 to hexadecimal:
A9
analyzing source code.
interpreter: faster, slower, lower, or easier
compiler: faster, slower, higher, or harder
interpreter: faster
compiler: slower
executing code:
interpreter: faster, slower, lower, or easier
compiler: faster, slower, higher, or harder
interpreter: slower
compiler: faster
using memory
interpreter: faster, slower, lower, or easier
compiler: faster, slower, higher, or harder
interpreter: lower
compiler: higher
debugging
interpreter: faster, slower, lower, or easier
compiler: faster, slower, higher, or harder
interpreter: easier
compiler: harder
var = ‘a’
data type: string, integer, char, float, boolean
char
var = “a”
data type: string, integer, char, float, boolean
string
a = 10; a = a+10;
data type: string, integer, char, float, boolean
integer
double sum; sum = 12.50;
data type: string, integer, char, float, boolean
float
3 + 4 == 7
data type: string, integer, char, float, boolean
boolean
(T/F) looping logic is circular rather than linear like branching logic
T
(T/F) branching logic is good for complex logic comparisons
F
(T/F) boolean output of the comparison is used to determine the path that the program takes
T
(T/F) looping is useful for monitoring a state within a program
T
(T/F) branching logic statements can be used across same data types
F
a true or false condition, usually represented by 1 (true) or 0 (false)
string, char, integer, float, boolean
boolean
any number with a decimal place
string, char, integer, float, boolean
float
one character such as a UTF-16 or UTF-32 character
string, char, integer, float, boolean
char
zero or more characters
string, char, integer, float, boolean
string
whole number with no decimal point
string, char, integer, float, boolean
integer