WorksheetsCompTIA ITF Programming (TestOut questions)
Total questions: 38
Worksheet time: 20mins
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?
Integer
Float
String
Boolean
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
Boolean
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
Variable
Object
Array
Which of the following programming models are built from class templates that have properties, attributes, and methods?
Encapsulation
Objects
Vector
Functions
Which of the following is a programming identifier that would be used to define values that don't change?
Constants
Arrays
Vectors
Variables
In object-oriented programming, which of the following concepts is used to describe properties?
Encapsulation
Polymorphism
Attributes
Methods
This programming language makes website elements interactive
HTML
CSS
JavaScript
This programming language is used to add colors, fonts, and other design elements to website
HTML
CSS
JavaScript
This programming language creates website structure and content
HTML
CSS
JavaScript
A software developer wants to provide a compiled executable program to a customer. Which of the following computer languages would provide this capability?
C++
Perl
Ruby
PowerShell
Alan, a programmer, needs to create an interactive web page. Which of the following programming languages types would he MOST likely use?
Assembly
Query
Compiled
Interpreted
Which programming language type is the most basic human-readable and closest to actual machine language?
Interpreted
Query
Compiled
Assembly
On a flowchart, which of the following represents a decision?
Diamond
Parallelogram
Arrow
Rectangle
Which of the following BEST describes a flowchart?
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.
What is the term for code that keeps running as long as a certain condition is met?
Decision
For loop
While loop
Branch
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
Encapsulation
Looping
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
Case statement
Branching
Jessica, a programmer, has created specific statements, including conditional loops to accomplish a task. What has she created?
Algorithm
Software
Pseudocode
Flowchart
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%.
Looping
8%
7%
Branching
Query
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 high-level instructions instead of detailed steps.
It uses a linear, top-down approach to solving problems.
It uses a non-linear approach to solving problems.
It uses a domain-specific language (DSL) to instruct the program what needs to be done.
Which of the following describes the declarative programming paradigm?
It uses detailed steps to provide instructions to a computer.
It uses a linear, top-down approach to solving problems.
It uses local and global variables as data types.
It uses a domain-specific language (DSL) to instruct the program what needs to be done.
Which of the following can be used by a programmer to debug code?
Word processor
Application programming interface (API)
Integrated development environment (IDE)
Text editor
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 can autocomplete key words.
An IDE allows projects to be kept organized in folders.
An IDE provides standard text-editing features.
An IDE allows for saving code with filename extensions.
An IDE has a library of built-in functions.
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?
Application programming interface (API)
Cascading Style Sheets (CSS)
Integrated development environment (IDE)
The C# programming language
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.
Increase the timeline to allow for the additional work.
Expand the development team to handle the additional work.
Use the same programming language for both operating systems.
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 sets the system color variable.
It gets input and produces output.
It sets the font color to the color specified in the input.
It sends the output to a printer.
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?
set num = random()
export random
import random
load random
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
C++
JavaScript
CSS
Which of the following BEST describes a front-end developer?
He or she may use Ruby, Java, PHP, and Python.
He or she may use query languages like SQL.
He or she services the website and manages user accounts.
He or she is concerned with the aesthetics of a website.
Which of the following BEST describes a back-end developer?
He or she controls what you see visually in your web browser when you visit a site.
He or she uses HTML, CSS, and JavaScript to determine the way a website looks.
He or she accesses information from databases and prevents unauthorized access.
He or she needs to make the website as user-friendly as possible.
Select the tags you MUST use to have a proper HTML document. (Select three.)
<h1>
<p>
<html>
<head>
<body>
What does JavaScript do?
Links digital objects to each other.
Contains the title of the web page.
Makes web pages interactive.
Makes websites look good.
Contains the title of the web page, links to stylesheets, and metadata to help search engines find the page.
<html>
<head>
<body>
<a>
Lets the browser know that it should interpret the document as HTML.
<html>
<head>
<body>
<a>
Contains all the elements that will be presented on the screen.
<html>
<head>
<body>
<a>
You want to have a hyperlink to testout.com on your web page. What is the correct HTML syntax to accomplish this?
<a href =
www.testout.com>
<a href="www.testout.com">Link to the TestOut homepage</a>
<a href="www.testout.com"></a>
<a href=>Link to the Testout.com homepage</a>
How many heading tags are available for heading and subheading when using HTML?
4
2
6
8
Which of the following tags contains all the elements that will be presented on the visual portion of a website?
<head></head>
<body></body>
<div></div>
<p></p>
