Programming fundamentals Flashcards
A variable is a name that represents values stored in the computer's \_\_\_\_\_\_. • Memory • CPU • Screen • Hard drive
Memory
The output of the following statement is \_\_\_\_. print(-5//2) • -3 • -2.5 • 3 • 2.5
-3
Python allows programmers to break a statement into multiple lines.
TRUE
FALSE
TRUE
A computers CUP can only understand instructions that are written as a sequence of bits.
TRUE
FALSE
TRUE
The format specifier is a string that contains special characters specifying how the numeric value should be formatted.
TRUE
FALSE
TRUE
The argument \_\_\_\_ is passed to the print function. This specifies that the print function should print a space instead of a newline character at the end of its output. • End=’ ‘ • \, • Backslash • comma
end=’ ‘
The python language uses a compiler, which translates a high-level language program into a complete machine language program.
TRUE
FALSE
FALSE
According to the behaviour of integer division, when an integer is divided by an integer, the result will be a float.
TRUE
FALSE
FALSE
A \_\_\_\_\_\_ is a diagram that graphically depicts the steps that take place in a program. • Flowchart • Pseudocode • Algorithm • Program
Flowchart
Comments in Python begin with # character.
TRUE
FALSE
TRUE
The instruction set for a microprocessor is unique and is typically understood only by the microprocessors of the same brand.
TRUE
FALSE
TRUE
Python formats all floating-point numbers to two decimal places when outputting with the print statement.
TRUE
FALSE
FALSE
In Python, print statements written on separate lines do not necessarily output on seperate lines.
TRUE
FALSE
TRUE
Choose all that apply. To create a Python program you can use:
Excel
IDLE
A text editor
A word processor if you save your file as a .docx
IDLE
A text editor
What is the informal language, used by programmers to create models of programs, that has no syntax rules and is not meant to be compiled or executed? • Flowchart • Pseudocode • Algorithm • Source code
Pseudocode