Readable Code — Unit test Answers

0 verified answers
1
Free Preview

Character encoding uses bit patterns, sequences of numbers, or electrical pulses to

A
recover errors in software programming.
B
represent characters in a given set.
C
correct grammatical and spelling errors.
D
define the placement of graphics on a website.
3

Which is true of ASCII and Unicode?

A
Every character written in Unicode can be represented in ASCII.
B
Every character written in ASCII can be represented using Unicode.
C
ASCII requires more bytes than Unicode.
D
ASCII and Unicode both define accented characters.
4

What is a feature of readable code?

A
The code is interesting to read.
B
The code uses meaningful names for variables, procedures, and classes.
C
The code is all aligned to the left margin.
D
The code is as compact as possible to save space.
6

The process of identifying and eliminating bugs in a software program is most generally called

A
reproducing the problem.
B
diagnosing.
C
debugging.
D
troubleshooting.
8

What does a computer program use as a means to evaluate a condition as True or False?

A
a Boolean expression
B
a Boolean string
C
a Boolean variable
D
a Boolean operator
9

Which function works best when you need to remove an element at a specific index in a list?

A
the len() function
B
the range() function
C
the pop() function
D
the deque() function
10

The best description for a group of elements in an array is

A
a data structure.
B
a queue.
C
a string.
D
a stack.
11

Which line of code will eliminate the element “calculator” from an array of supplies?

A
supplies.append(“calculator”)
B
supplies.pop(“calculator”)
C
supplies.delete(“calculator”)
D
supplies.remove(“calculator”)
12

One reason it is important to write code that is readable is that

A
it makes the code execute faster, which makes the code run better.
B
it saves space on the page for important comments.
C
it makes it easier to copy when you want to send the code to others.
D
it makes it easier to follow when revisions or updates are called for.

Did you find these answers helpful?