Week 2 Flashcards
Comments in Python begin with the # character
True
When using the camelCase naming convention, the first word of the variable name is written in lowercase and the first characters of all subsequent words are written in uppercase.
True
According to the behavior of integer division, when an integer is divided by an integer, the result will be a float.
False
Python allows programmers to break a statement into multiple lines.
True
Python formats all floating-point numbers to two decimal places when outputting with the print statement.
False
A flowchart is a tool used by programmers to design programs
True
In Python, math expressions are always evaluated from left to right, no matter what the operators are.
False
Computer programs typically perform three steps: input is received, some process is performed on the input, and output is produced.
True
In Python, print statements written on separate lines do not necessarily output on separate lines.
True
The \t escape character causes the output to skip over to the next horizontal tab.
True
Since a named constant is just a variable, it can change any time during a program’s execution.
False
What is the informal language, used by programmers use to create models of programs, that has no syntax rules and is not meant to be compiled or executed?
a. flowchart
b. algorithm
c. source code
d. pseudocode
D. pseudocode
A(n) __________ is a diagram that graphically depicts the steps that take place in a program?
a. flowchart
b. algorithm
c. source code
d. pseudocode
A. Flowchart
The __________ function reads a piece of data that has been entered at the keyboard and returns that piece of data, as a string, back to the program.
a. input()
b. output()
c. eval_input()
d. str_input()
a. input()
The line continuation character is a
a. #
b. %
c. &
d. \
d. \