Module 6 Flashcards
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
A software developer wants to add a custom Google Map to a customer’s website. Which of the following would the developer use to accomplish this?
Cascading Style Sheets (CSS)
Application programming interface (API)
Integrated development environment (IDE)
The C# programming language
Application programming interface (API)
On a flowchart, which of the following represents a decision?
Arrow
Parallelogram
Diamond
Rectangle
Diamond
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 linear, top-down approach to solving problems.
It uses a domain-specific language (DSL) to instruct the program what needs to be done.
It uses high-level instructions instead of detailed steps.
It uses a non-linear approach to solving problems.
It uses a linear, top-down approach to solving problems.
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 sends the output to a printer.
It sets the font color to the color specified in the input.
It sets the system color variable.
It gets input and produces output.
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 variable
A constant
An array
A float
An array
Which of the following describes the declarative programming paradigm?
It uses a domain-specific language (DSL) to instruct the program what needs to be done.
it uses detailed steps to provide instructions to a computer.
It uses local and global variables as data types.
It uses a linear, top-down approach to solving problems.
It uses a domain-specific language (DSL) to instruct the program what needs to be done.
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
A software developer wants to create an application that will work on Windows and Apple iOS operating systems. What can the developer do to make this task easier?
Use the APIs for each operating system.
Use the same programming language for both operating systems.
Increase the timeline to allow for the additional work.
Expand the development team to handle the additional work.
Use the APIs for each operating system.
What is the term for code that keeps running as long as a certain condition is met?
Decision
Branch
While loop
For loop
While loop
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%.
Branching
Looping
Query
8%
7%
Branching
8%
Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created?
Algorithm
Software
Flowchart
Pseudocode
Algorithm
Which of the following can be used by a programmer to debug code?
Text editor
Integrated development environment (IDE)
Word processor
Application programming interface (API)
Integrated development environment (IDE)
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?
import random
load random
set num = random()
export random
import random
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?
Looping
Programming array
Encapsulation
Branching
Branching
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
Looping
Branching
Case statement
Looping
Which of the following BEST describes a flowchart?
It starts at the first line and then executes one line at a time until the end.
It is a step-by-step procedure that illustrates how a problem is to be solved.
It does the same thing over and over in exactly the same way.
It is a visual representation of the logic in a program
It is a visual representation of the logic in a program.
Which of the following features of an integrated development environment (IDE) BEST allow a programmer to code faster and with less effort? (Select two.)
An IDE allows for saving code with filename extensions.
An IDE has a library of built-in functions.
An IDE provides standard text-editing features.
An IDE can autocomplete key words.
An IDE allows projects to be kept organized in
An IDE can autocomplete key words.
An IDE has a library of built-in functions.
In object-oriented programming, which of the following concepts is used to describe properties?
Methods
Encapsulation
Polymorphism
Attributes
Attributes
A software developer wants to provide a compiled executable program to a customer. Which of the following computer languages would provide this capability?
Perl
C++
PowerShell
Rub
C++
A developer is creating an application that requires a value to be stored with decimal precision. Which of the following data types should be used for the variables that will store these values?
Float
Integer
String
Boolean
Float
Match each language to its general purpose in a website.
Makes website elements interactive
Adds colors, fonts, and other design elements to website
Creates website structure and content
JavaScript
CSS
HTML
JavaScript
CSS
HTML
Alan, a programmer, needs to create an interactive web page. Which of the following programming languages types would he MOST likely use?
Query
Assembly
Compiled
Interpreted
Interpreted
Which programming language type is the most basic human-readable and closest to actual machine language?
Interpreted
Compiled
Assembly
Query
Assembly