When did Guido van Rossum begin developing Python?
In late 1989.
What inspired the name Python?
The British comedy group Monty Python.
When was Python 0.9.0 released?
February 1991.
What kind of typing does Python use?
Dynamic typing.
Which fields commonly use Python?
Data science, machine learning, web development, scientific computing, and automation use Python.
What does a REPL do with code entered one line at a time?
It reads and executes each line, displays the result, and repeats.
What is Python IDLE, and how is it distributed?
It is an IDE included with the standard Python installation.
What normally marks the end of a Python statement?
A newline character.
What does a backslash do between physical lines in Python?
It joins them into one logical statement.
What separates multiple Python statements on one line?
A semicolon.
What is indentation in Python?
Leading whitespace that determines how statements are grouped into blocks.
What punctuation starts a Python block?
A colon.
What indentation must statements within a Python block use?
Consistent indentation.
How many spaces does Python recommend for indentation?
Four spaces.
What is a Python variable?
A named memory location used to store data.
How does Python determine a variable’s type?
From the value assigned to it.
What rules determine which names are valid Python identifiers?
They start with a letter or underscore, then use letters, digits, or underscores; they are case-sensitive and cannot be reserved keywords.
What does Python’s assignment operator = do?
It assigns a value to a variable.
Which two forms of multiple assignment does Python support?
Multiple-target assignment and chained assignment.
What does Python’s input() function return?
User input as a string.
What is a Python integer?
A whole number without a decimal part.
What length limit applies to Python integers?
Python integers have no fixed length limit.
What notation can Python floats use to represent a power of ten?
E notation.
What two values can a Python Boolean represent?
True or False.
What is a Python Boolean used for?
Conditional logic.
How can Python strings be enclosed?
In single, double, or triple quotes.
Which operators are included among Python’s arithmetic operators?
+, -, *, **, /, //, and %.
What do comparison operators return after comparing two operands?
A Boolean value: True or False.
Which symbols are Python’s comparison operators?
>, <, ==, !=, >=, and <=.
What do Python’s logical operators do to Boolean expressions?
They combine or negate Boolean expressions.
What do Python’s `is` and `is not` operators test?
Whether two objects refer to the same memory location.
What do Python’s `in` and `not in` operators test?
Whether a sequence contains a specified item.
When is `x in y` true for strings and bytes?
When `x` is a substring of `y`.
What do bitwise operators operate on?
Binary operands.
What operation does the bitwise & operator perform?
AND.
What operation does the bitwise | operator perform?
OR.
What operation does the bitwise ^ operator perform?
Exclusive OR.
What operation does the bitwise ~ operator perform?
Bit inversion.
Which programming tools were included in Python 1.0?
Functional tools such as map(), filter(), and reduce().
Which three programming paradigms does Python support?
Procedural, object-oriented, and functional programming.
What programming languages can extend Python?
C or C++.
How is Python described in relation to application development?
It is usable for frontend and backend development.
Which libraries support Python data analysis and visualization?
NumPy, pandas, and Matplotlib.
Which frameworks build Python web applications?
Django, Pyramid, and Flask.
What image-processing tasks can Python's OpenCV support?
Face detection and gesture recognition.
What can PyGame applications be installed on besides desktop computers?
Android devices.
Which platforms are used with Python for embedded systems, automation, robotics, and IoT?
Raspberry Pi and Arduino.
How can Python scripts automate recurring tasks such as backups?
By scheduling them to run at predefined times.
What are the four steps in a REPL interaction?
Read the code, evaluate it, print the result, and repeat.
What command opens the Python shell from a Windows command prompt?
Type `python` and press Enter.
What prompt appears in the Python shell opened from Windows?
`>>>`
What editing features does IDLE provide?
Syntax highlighting, auto-completion, and line numbers.
What debugging features does IDLE provide?
Breakpoints, stepping, and variable viewing.
On which operating systems does IDLE run?
Windows, macOS, and Linux.
Which delimiters let Python expressions span lines without backslashes?
Parentheses, square brackets, or curly braces.
Which naming styles do Python conventions use for classes, functions, modules, constants, and special names?
TitleCase for classes, lowercase with underscores for functions and modules, uppercase for constants, and double leading and trailing underscores for special names.
Which function displays console output in Python?
print().
What remainder does Python return for 11 % 3?
2.
What result does Python return for 6 // 5?
1.
Which augmented assignment forms are listed for Python?
+=, -=, *=, /=, //=, %=, ^=, &=, |=, >>=, and <<=.
What does `1 in [1, 2, 3, 4, 5]` evaluate to?
`True`.
What does `1 not in [1, 2, 3, 4, 5]` evaluate to?
`False`.
For x = 5, what does x << 2 evaluate to?
20.
Which language ecosystem does Jython interact with?
Java libraries.
How do operand types determine the result type of addition, subtraction, or multiplication?
The result is complex if either operand is complex, floating point if either is a float, and integer if both are integers.
How does Python’s left-shift operator `<<` move bits?
It shifts bits left, inserting zeros on the right without dropping leftmost bits.
Answer 19 questions on Python Programming Fundamentals.
1. Regarding Python’s origins, which statements are accurate?
2. Which areas are established applications of Python?
Go over the full study guide for Python Programming Fundamentals.
Read the study guide →Upload your class notes and Revizly writes your flashcards in about a minute.
Flashcard maker