Module 6 Flashcards

1
Q

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

A

10

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

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

A

Application programming interface (API)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

On a flowchart, which of the following represents a decision?

Arrow

Parallelogram

Diamond

Rectangle

A

Diamond

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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.

A

It uses a linear, top-down approach to solving problems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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.

A

It gets input and produces output.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

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

A

An array

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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.

A

It uses a domain-specific language (DSL) to instruct the program what needs to be done.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

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

A

JavaScript

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

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.

A

Use the APIs for each operating system.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the term for code that keeps running as long as a certain condition is met?

Decision

Branch

While loop

For loop

A

While loop

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

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%

A

Branching

8%

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created?

Algorithm

Software

Flowchart

Pseudocode

A

Algorithm

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

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)

A

Integrated development environment (IDE)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

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

A

import random

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

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

A

Branching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

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

A

Looping

17
Q

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

A

It is a visual representation of the logic in a program.

18
Q

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

A

An IDE can autocomplete key words.

An IDE has a library of built-in functions.

19
Q

In object-oriented programming, which of the following concepts is used to describe properties?

Methods

Encapsulation

Polymorphism

Attributes

A

Attributes

20
Q

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

A

C++

21
Q

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

A

Float

22
Q

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

A

JavaScript

CSS

HTML

23
Q

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

A

Interpreted

24
Q

Which programming language type is the most basic human-readable and closest to actual machine language?

Interpreted

Compiled

Assembly

Query

A

Assembly

25
Q

Which of the following programming models are built from class templates that have properties, attributes, and methods?

Encapsulation

Vector

Objects

Functions

A

Objects

26
Q

Which of the following is a programming identifier that would be used to define values that don’t change?

Vectors

Variables

Arrays

Constants

A

Constants

27
Q

A programmer is creating an application that needs to store a value indicating if the user is logged in or not. Which of the following would be the BEST data type to accomplish this?

Boolean

Integer

String

Float

A

Boolean

28
Q

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?

Variable

Array

Object

Constant

A

Variable