Software Development
When programming a while statement, it is sometimes useful to use a logical NOT operator. The logical NOT operator reverses the logical state of an operand so that if the condition is normally true, the logical NOT operator makes it false. Which of the following is an example of a logical NOT operator? (var1 = var2) || var3 (var1 || var 2) ~var1 NOT(var1 || var2) !(var1 && var2)
!(var1 && var2)
Match each language to its general purpose in a website. (HTML, JavaScript, CSS) 1. Makes website elements interactive 2. Adds colors, fonts, and other design elements to website 3. Creates website structure and content
1. JavaScript 2. CSS 3. HTML
After running the following pseudocode, what will the value of VARIABLE be? Set value of VARIABLE to 5 Increase the value of VARIABLE by 3 If the value of VARIABLE is odd, increase its value by 1 If the value of VARIABLE is even, increase its value by 1 If the value of VARIABLE is odd, increase its value by 1 8 9 10 11
10
What does the following pseudocode do if the input entered is 10, 12, 18, 4, 6? program calculateAverage declare array of numbers n[5] declare number i declare number average get input from user "Enter 5 numbers to calculate the average" for (i=0; loop for 5 iterations; increment i) average = average plus n[i] end average = average divided by 5 display "The average is", average ;displays the average 12 25 50 10
10
What does the following pseudocode do when the input is 10? program DaysInMonth declare number array dayspermonth = [31,28,31,30,31,30,31,31,30,31,30,31] declare number month get input "Enter a month "if month < 1 or month > 12 then display error else display "Number of days in month", month, "is ", dayspermonth[month] end 30 error 28 31
31
What is displayed based on the output from the following pseudocode if the count is 42? declare number total = 32 declare number count while count > total count = count - 1 loop display count 31 33 32 0
32
Which of the following logic components is being used and how much is the interest if the amount is 5,000? (Select two.) IF amount < 5,000 THEN interest = 7%, ELSE interest = 8%. 8% 7% Query Branching Looping
8% Branching
Select the tags you MUST use to have a proper HTML document (Select three.) <head> <p> <a> <html> <h1> <body> <div>
<head> <html> <body>
You are working on a program that needs to keep track of many values at the same time. Which of the following would you use? A constant An array A float A variable
An array
Which of the following is a type of variable that can hold many values at the same time? Constant Variable Value Array
Array
When a programmer is using branching or looping, a comparison is made to determine the next instruction to execute. A credit score of 690 or above is considered good, and below 690 is considered poor and a greater risk to lend someone money. In the following pseudocode, what would be the correct comparison operator to use? IF creditScore _____ 690 THEN interest = 8%, ELSE interest = 18%. <= >= = <>
>=
David is creating a cross-platform program using Python. Which of the following language types is Python? Query Interpreted Markup Compiled
Interpreted
Phillip, a programmer, is trying to decide whether to use a compiled language or an interpreted language. The program needs to work on multiple platforms. Which of the following would be the BEST reason for choosing an interpreted language? A compiled language executes slower than interpreted languages. A compiled language requires rewriting and recompiling for each platform. A interpreted language can be provided to customers on different platforms in the form of an executable file. A interpreted language does not require code to be compiled into bytecode.
A compiled language requires rewriting and recompiling for each platform.
Lydia, a programmer, is using a two-dimensional array to store a user's status for their chat program. As a container, an array is a special kind of variable that can store many values. Lydia created the following: declare user(40,2) as a string Which of the following is true about containers? A container is not relevant to this array example. A container cannot be used for string vectors. A container is only used to declare arrays. A container is an identifier that is used to reference the user array.
A container is an identifier that is used to reference the user array.
Alex is creating a loan program and need to use a program sequence repeatedly to calculate the interest for different loans. Which of the following is the BEST programming concept to accomplish the task? A function An array A container A boolean loop structure
A function
Which of the following BEST describes a programming sequence? A list of subroutines used by a compiler. A graphical representation of the program processes. A sequence of instructions that defines the input, processing, and output. A list of steps written in pseudocode.
A sequence of instructions that defines the input, processing, and output.
Databases, authentication, and user accounts are all part of a website's ______________. Protocols Frontend Backend Full stack
Backend
A user is shopping online and has added two items to the cart. When the user clicks the Checkout button, the shopping cart programming logic checks to see if the user is logged in already. If the user is logged in, the checkout process continues, otherwise, the user is prompted to sign in. Which of the following describes the logical component being used? Branching Programming array Looping Encapsulation
Branching
Which of the following programming languages is a compiled language? SQL JavaScript C Ruby
C
Lisa is a software developer and needs to create a complied executable program for one of her clients. Which of the following is a compiled programming language she could use? (Select two.) Perl SQL PHP JavaScript C# Java
C# Java
A software developer wants to provide a compiled executable program to a customer. Which of the following computer languages would provide this capability? PowerShell C++ Ruby Perl
C++
Alan, a programmer, needs to create an interactive web page. Which of the following programming languages types would he MOST likely use? Interpreted Compiled Query Assembly
Interpreted
Python is a general purpose programming language that is popular for creating websites and mobile applications. Python is known as a readable and user-friendly language. What does the following code do? color = input('What is your favorite color?\n')print('Your favorite color is %s.' % color) It gets input and produces output. It sets the font color to the color specified in the input. It sets the system color variable. It sends the output to a printer.
It gets input and produces output.
The idea of programming by modeling real-world things into computer code is called _____________. Object-oriented programming Inheritance Encapsulation Polymorphism
Object-oriented programming
Which of the following is used to model real-world objects into computer code? Object-oriented programming Algorithms Pseudocode Flow charting
Object-oriented programming
Which of the following programming models are built from class templates that have properties, attributes, and methods? Encapsulation Objects Vector Functions
Objects
Object-Oriented Programming (OOP) is a newer approach to programming where functionality is divided into smaller groups of tasks and actions. With OOP, you can model real world objects in a programming language. There are two main concepts. The first is like a template, and the second is the specific models built from the templates. What are these two concepts called? Methods Objects Classes Values Properties Attributes
Objects Classes
In programming, which of the following is the BEST use of a function? Bundle data and methods Prevent unauthorized access to data Provide reusable code snippets Contain methods
Provide reusable code snippets
A business user wants to retrieve data from a relational database. Which of the following would they use to get the data they need? Markup language Compiled language Interpreted language Query language
Query language
Pam is working with a database that contains all the product and customer orders for her company. Pam is using SQL to access the database to retrieve a customer's order. Which of the following BEST describes SQL? Markup language Compiled language Object-oriented language Query language
Query language
Enrique, a web developer, is creating a new website for a customer and is using Ruby to provide dynamic content for the web pages. Which language type is he using? Compiled Assembly Scripting Machine
Scripting
A method is declared within a class. Which of the following would be an example of a method for a Car class? style color wheels Start engine
Start engine
A programmer is developing an application that will store names and addresses (street, city, state, and zip code). The zip code must be able to accommodate alphanumeric characters to accommodate international zip codes, such as Canada. Which data type should be used for the variable that will hold the zip code? Float String Integer Char
String
A developer is creating a program that will store a customer's latest order number. The value will change each time a customer creates a new order. Which of the following would MOST likely be used to store the value? Constant Object Variable Array
Variable
A programmer needs to store the input from a user so it can be used later in the program. Which of the following would be the BEST choice to accomplish this task? Constant Function Variable Method
Variable
Which of the following is a programming identifier that would be used to define values that change? Arrays Variables Constants Vectors
Variables
A developer is creating a container that needs the ability to resize itself dynamically when an element is added or removed and can hold many values. Which of the following would BEST provide this functionality? Array Variable Vector Constant
Vector
What is the term for code that keeps running as long as a certain condition is met? Decision For loop Branch While loop
While loop
Given the following pseudocode, which of the following is displayed if the user enters 4? declare number guess input "Guess a number between 1 and 10?" if guess <= 1 || guess >= 10 display "Your guess is not valid." else if guess >=1 && guess <= 10 display "Your guess is valid." else display "Error." end Your guess is valid. No output. Your guess is not valid. Error.
Your guess is valid.
Give the following example of a class, which of the following represent an attribute? DriversLicense name: string birthdate: number height: number eyeColor: string valid() expired() expired() valid() weight: number eyeColor: string
eyeColor: string
When using an if...else statement or a while loop, a programmer must test for a certain condition to be true. In the following pseudocode example, which line contains the condition? program guessMyFavoriteColor declare favoriteColor equal to Yellow declare guess read guess from user do while (guess does not equal favoriteColor) display "You guessed my favorite color" else display "That is not my favorite color" end while end program end while do while guess does not equal favoriteColor declare favoriteColor equal to Yellow
guess does not equal favoriteColor
Python provides programming functions that can be used by a software developer. Which of the following would be used to make the random function available? load random set num = random() export random import random
import random
A programmer wants to create a visual representation of all the branching and sequencing for a program. Which of the following should the programmer use? Pseudocode Function Algorithm Flow chart
Flow chart
Using HTML and CSS to provide visual elements to the end user would be considered part of a website's _____________. Full stack Backend Protocols Frontend
Frontend
Julien, a programmer, was fixing a bug in the programming code written by another developer. He discovered that the code with the bug was repeated several times. Instead of fixing the bug in multiple places, which of the following programming features should he use so the code is only located in one place? Variables Container Loops Functions
Functions
Computer programming is ________________. An application that can run on a computer. Giving a computer precise instructions for what it should do. Operating a machine with computerized components, such as a smartphone. Using advanced computer applications like Excel or Access.
Giving a computer precise instructions for what it should do.
Which of the following is technically NOT a programming language? HTML Java JavaScript C++
HTML
Martin, a software developer, is working on a programming function that takes input and displays a message based on which input the user enters. The input is the primary colors, red, blue, and green. Which is the BEST programming construct to use? Variable Object Constant If
If
Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created? Algorithm Flowchart Software Pseudocode
Algorithm
A programmer is developing a program that will list the order history for a customer. Which of the following data structures is the BEST one to use? Variable Function Constant Array
Array
Hans is programming a device driver that will interact directly with hardware. The language he's using is considered the most difficult human-readable language. Which of the following languages is he utilizing? Markup Assembly Compiled Interpreted
Assembly
Which programming language type is the most basic human-readable and closest to actual machine language? Query Compiled Assembly Interpreted
Assembly
In object-oriented programming, which of the following concepts is used to describe properties? Polymorphism Methods Encapsulation Attributes
Attributes
Lynda, a programmer, is developing a Linux device driver in assembly language. Many device drivers are written in the C language. Which of the following is the BEST reason for using assembly language instead of C? Code written in assembly is easier to read than compiled C code. Assembly code is more portable than C. Code written in assembly is more efficient and allows direct access to hardware. Assembly code is more detailed and doesn't use libraries.
Code written in assembly is more efficient and allows direct access to hardware.
Tyler, a software developer, is creating a program written in Java to calculate loan payments. Which language type BEST describes Java? Compiled Markup Scripting Interpreted
Compiled
Kris is creating the pseudocode for a program that needs a specific value that doesn't change. Which type of identifier is defined in the following pseudocode: declare pi as a float equal to 3.14 Variable Constant Array Container
Constant
Which of the following is a programming identifier that would be used to define values that don't change? Vectors Arrays Constants Variables
Constants
On a flowchart, which of the following represents a decision? Diamond Parallelogram Rectangle Arrow
Diamond
____________ is a principle that limits access to certain parts of a program to public methods. Inheritance Encapsulation Polymorphism Abstraction
Encapsulation
Which of the following BEST describes a flowchart? It is a visual representation of the logic in a program. It does the same thing over and over in exactly the same way. It is a step-by-step procedure that illustrates how a problem is to be solved. It starts at the first line and then executes one line at a time until the end.
It is a visual representation of the logic in a program.
Maria is working on the design for a program and has created the following pseudocode. What is the result of this pseudocode? declare loanBalance as a decimal value equal to 0.00 declare loanLimit as a decimal value to 1000.00 declare withdrawal as a decimal value While loanBalance >= 0 input withdrawal loanBalance equals loanBalance + withdrawal print loanBalance Loop It results in a syntax error. It stops processing withdrawal input after 1000.00 is reached. It displays the loan balance each time a withdrawal is made. It results in an infinite loop.
It results in an infinite loop.
A programming paradigm is a method used to program a computer that guides the solving of a problem or performing of a task. Which of the following describes the procedural, or imperative, programming paradigm? It uses a domain-specific language (DSL) to instruct the program what needs to be done. It uses a non-linear approach to solving problems. It uses a linear, top-down approach to solving problems. It uses high-level instructions instead of detailed steps.
It uses a linear, top-down approach to solving problems.
A software developer is working on a website and has been tasked with adding interactive elements to it. Which of the following programming languages would work BEST for this task? HTML CSS C++ JavaScript
JavaScript
Which of the following programming languages are interpreted languages? (Select three.) Pascal JavaScript Python C# Ruby Java C++
JavaScript Python Ruby
What is the result of the following pseudocode when the value of currentDistance is 6? declare hike = 12 if currentDistance < hike display "Keep going, you can do it!" else if currentDistance >= hike display "Great job, you made it!" end Syntax error. Great job, you made it! Nothing. The comparison is never true. Keep going, you can do it!
Keep going, you can do it!
Diana, a developer, needs to program a logic component that will allow the user to enter a series of values. Which of the following would BEST provide that functionality? Scripting Case statement Branching Looping
Looping
Carlos is building a web page using HTML. The web page is not interactive and only contains static content. Which of the following language types BEST describes HTML? Scripting Interpreted Compiled Markup
Markup
Classes contain properties, which are the attributes or characteristics that objects can hold as fields or private variables. Which of the following is TRUE about properties? Properties in a class do not actually have the ability to store data in the fields or private variables. Methods are used to read or write properties. Other programs can access and change properties directly. The properties are read-only, so there is no need to access them publicly.
Methods are used to read or write properties.
