CH15 Assessment Flashcards
Interpret the following logic. A law enforcement agency has received data indicating that there are ten current threats to public safety. What is the threat level?
if threats < 3, level is “green”
else if threats < 6, level is “yellow”
else if threats < 9, level is “orange”
else if threats < 12, level “red”
else level is “emergency”
A. green B. orange C. yellow D. red E. emergency
D. Red
You are creating a function that must return either True or False. Which data type should the function return?
Boolean
Which type of coding practice uses smaller code modules working together to support an application?
Microservices
Which of the SDLC phase is the shortest in duration?
Deployment
A programmer needs to write code that has direct access to the computer’s hardware. Which is the best type of language for the programmer to use?
A. Compiled
B. Query
C. Interpreted
D. Assembly
D. Assembly
Which of the following is an example of Markup Language?
A. XML
B. SQL
C. Python
D. Java
A. XML
Which of the following terms describe concepts related to breaking code into smaller, repeatable sections? (Choose Two)
A. Methods B. Objects C. Variables D. Containers E. Functions
A. Methods
E. Functions
Which SDCL phase involves the use of a Flowchart?
Design
Which of the following programming language types is the lowest-level language?
Assembly
What type of high-level programming language is translated into machine code once and then executed many times?
Compiled
You are using the C programming language to create a software solution. A single variable must be tested for multiple possible values. Which programming construct is best suited to achieve this?
A. Select Case
B. Switch
C. IF
D. While
B. Switch
In OOP, which of the following are integral parts of objects? (Choose Two)
A. Properties
B. Variables
C. Arrays
D. Attributes
A. Properties
D. Attributes
Which of the following programming languages requires a compiler?
A. Microsoft PowerShell
B. Assembly
C. Linux Bash
D. C
D. C
You are working with file system objects in your code. You need to determine the modification timestamp for a file. What should you reference?
Property
Which term describes running an action against an object variable?
Method
A developer needs to use a code designation for non-English letters. Which national system does the developer need to use?
A. ASCII
B. Unicode
C. Strings
D. International
B. Unicode
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 the BEST approach to this?
A. Create a separate variable for the 16th Integer.
B. Create a Vector and replace the array with it.
C. Add it to the Existing Array
D. Create a new array, that can hold 16 integers, copy all the first array to it, then add the 16th integer.
B. Create a Vector and Replace the Array with it.
Which of the following are examples of interpreted languages? (Choose Two)
A. Query
B. Markup
C. Scripted
D. Compiled
B. Markup
C. Scripted
Which of the following are examples of OOP languages? (Choose Two)
A. Java B. SQL C. XML D. C E. Python
A. Java
E. Python
Your code needs to execute the same code for each month of the year, so 12 times. Which type of loop is best suited for this?
FOR
Which of the following statements is true regarding arrays and vectors?
A. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.
B. Arrays contain one data type and are dynamic in length. Vectors can have multiple data types and are fixed in length.
C. Arrays can have multiple data types and are fixed in length. Vectors have one data type and are dynamic in length.
D. Arrays can have multiple data types and are dynamic in length. Vectors have one data type and are fixed in length.
A. Arrays contain one data type and are fixed in length. Vectors can have multiple data types and are dynamic in length.
What type of programming language is designed to retrieve data from a database?
Query
Which of the following numbers is written in HEX format?
A. 100101.11
B. 3268
C. 18AF
D. 100101
C. 18AF
Looping logic makes use of which of the following statements?
A. WHEN
B. IF
C. WHILE
D. LOOP
C. WHILE
Interpret the following logic. For data input for someone who is 20 years old, which category will they fall into?
if age < 13, category is "child" else if age < 20, category is "teen" else if age < 65, category is "adult" else category is "senior"
A. Child
B. Adult
C. Teen
D. Senior
B. Adult