Module 1 Flashcards

Learn Python

1
Q

Python is an example of:

A. A machine language
B. A natural language
C. A high-level programming language

A

C. A high-level programming language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A complete set of known commands is called:

A. a machine list
B. a low-level list
C. an instruction list

A

C. an instruction list

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is a source code?

A. Machine code executed by computers
B. Another name for a source file
C. A program written in a high-level programming language

A

C. A program written in a high-level programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What do you call a computer program which directly executes instructions written in a programming language?

A. a translator
B. an interpreter
C. a compiler

A

B. An interpreter

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is CPython?

A. A compiled language used to perform high-level programming functions
B. Another name for Cython, a superset of the Python programming language
C. The default implementation of the Python programming language

A

C. The default implementation of the Python programming language

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is IDLE?

A. A version of Python
B. An acronym that stands for Integrated Development and Learning Environment for Python
C. An acronym that stands for Interactive Development and Learning Extension

A

B. An acronym that stands for Integrated Development and Learning Environment for Python

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What do you call a tool that lets you launch your code step-by-step and inspect it at each moment of execution?
A. a console
B. a debugger
C. an editor

A

B. a debugger

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How did Python, the programming language, get its name?

A. Guido van Rossum named it to honor Python of Catana, a dramatic poet of the time of Alexander the Great.
B. Guido van Rossum named it to honor Monty Python’s Flying Circus, a BBC comedy series popular in the 1970s.
C. Guido van Rossum named it after the Pythonidae - a family of large, nonvenomous snakes.

A

B. Guido van Rossum named it to honor Monty Python’s Flying Circus, a BBC comedy series popular in the 1970s.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Which one of the following is an example of a Python file extension?

A. p
B. py
C. pi

A

B. py

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the expected behaviors of the following program?

print(“Hello!”)

A. The program will output Hello! to the screen.
B. The program will output (“Hello”!) to the screen.
C. The program will output “Hello!” to the screen.
D. The program will generate an error message on the screen.

A

A. The program will output Hello! to the screen.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is CPython?

A. It’s a programming language that is a superset of Python, designed to produce C-like performance with code written in Python.
B. It’s the default, reference implementation of Python, written in the C language.
C. A. It’s a programming language that is a superset of the C language, designed to produce Python-like performance with code written in C.
D. It’s the default, reference implementation of the C language, written in the Python.

A

B. It’s the default, reference implementation of Python, written in the C language.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is TRUE about compilation? (Select two answers)

A. It tends to be slower than interpretation.
B. Both you and the end user must have the compiler to run your code.
C. The code is converted directly into machine code executable by the processor.
D. It tends to be faster than interpretation.

A

C. The code is converted directly into machine code executable by the processor.
D. It tends to be faster than interpretation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is machine code?

A. A medium-level programming language consisting of the assembly code designed for the computer processor.
B. A low-level programming language consisting of hexadecimal digits that make up high-level language instructions.
C. A high-level programming language consisting of instruction lists that humans can read and understand.
D. A low-level programming language consisting of binary digits/bits that the computer reads and understands.

A

D. A low-level programming language consisting of binary digits/bits that the computer reads and understands.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the best definition of a script?

A. It’s a text file that contains instructions which make up a Python program.
B. It’s an error message generated by the interpreter.
C. It’s an error message generated by the compiler.
D. It’s a text file that contains sequences of zeroes and ones.

A

A. It’s a text file that contains instructions which make up a Python program.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Select the true statements? (Select two answers)

A. Python is a good choice for low-level programming, e.g., when you want to implement an effective driver.
B. Python is free, open-source, and multiplatform.
C. Python is a good choice for creating and executing tests for applications.
D. Python 3 is backwards compatible with Python 2.

A

B. Python is free, open-source, and multiplatform.
C. Python is a good choice for creating and executing tests for applications.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What do you call a file containing a program written in a high-level programming language?

A. a source file
B. a code file
C. a machine file
D. a target file

A

A. a source file

17
Q

What are the four fundamental elements that make a language?

A. An alphabet, a lexis, a syntax, and semantics
B. An alphabet, phonetics, phonology, and semantics
C. An alphabet, morphology, phonetics, and semantics
D. An alphabet, a lexis, phonetics, and semantics

A

A. An alphabet, a lexis, a syntax, and semantics

18
Q

What is the expected behavior of the following program?

prin(“Goodbye!”)

A. The program will output Goodbye! to the screen
B. The program will output (“Goodbye!”)
C. The program will output “Goodbye!”
D. The program will generate an error message on the screen

A

D. The program will generate an error message on the screen

19
Q

What do you call a command-line interpreter which lets you interact with your OS and execute Python commands and scripts?

A. a compiler
B. a console
C. jython
D. an editor

A

B. a console