Use Conditional Statements Answers

10 verified answers1 views
1
Free Preview

Which of the following are characteristics of readable code? Choose all that apply.

A
meaningful and consistent naming of variables and procedures
B
variable names that are chosen at random
C
helpful comments
D
good use of indentation and line breaks
2
Free Preview

Which of the following are examples of the good use of indentation and line breaks? Choose all that apply.

A
the use of line breaks to separate segments of code
B
the use of indentation to create segments of code that are easy to identify
C
the omission of line breaks so that code can be written without any interruption
D
the use of indentation that hides segments of code
3

You are writing a program to calculate student grades. Which of the following would make good variable names?

A
Var01, Var02, Var03, Var04
B
Test01, Quiz01, Test02, Quiz02
C
Dog01, Dog02, Dog03
D
X01, X02, X03, X04
4

Your program will be used by many departments at the university. Your comments will be important to their IT people. What would be a useful comment?

A
This was a really hard part to write, but it finally works.
B
I’m not sure what this does, but I don’t have time to troubleshoot it.
C
This segment returns a value that is used by the segment marked B.
5

Readable code includes

A
the use of formatting to make the code look better.
B
the use of dense lines of code without indentation.
C
the use of comments that are of no use to future users of the program.
D
line breaks that help a programmer follow the flow of the program.
6

Which of the following represent the use of formatting to create readable code? Choose all that apply.

A
Line breaks are used to separate every ten lines of code.
B
Line breaks are used to separate segments of code.
C
Indentation is used to create a pattern that is easy to follow.
D
Indentation is used to make it easier to follow the flow of logic in the code.
7

Question text not available

Answer not available
8

Question text not available

Answer not available
9

Which of the following are reasons why it is important to write readable code? Choose all that apply.

A
Readable code is easier to maintain.
B
Readable code is easier to modify.
C
Readable code is fun to write.
D
Writing readable code saves time in the long run.
10

Question text not available

Answer not available

Did you find these answers helpful?

Use Conditional Statements Answers…