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