Culture Easy¶
Where does the name "Python" come from?¶
The snake species.
The BBC comedy show Monty Python's Flying Circus.
Guido van Rossum's pet.
A contraction of "Pythagoras".
Answer¶
Guido van Rossum named the language after Monty Python's Flying Circus, not the snake.
Who created the Python programming language?¶
Linus Torvalds.
Dennis Ritchie.
Guido van Rossum.
James Gosling.
Answer¶
Guido van Rossum started Python in late 1989 and released the first version in 1991.
In what year was Python first released?¶
Answer¶
Guido van Rossum published the first release of Python in 1991.
What is the standard file extension for Python source files?¶
.pt.pyt.py.python
Answer¶
Python source files use the .py extension.
Which major version of Python is actively supported today?¶
Python 1.
Python 2.
Python 3.
Python 5.
Answer¶
Python 3 is the current, supported line. Python 2 reached end of life on January 1, 2020.
What is the name of Python's official third-party package repository?¶
npm.
PyPI.
PythonHouse.
CRAN.
Answer¶
PyPI, the Python Package Index, hosts the third-party packages you install
with pip. npm belongs to Node.js and CRAN to R; "PythonHouse" is not a
real thing.
What command do you normally use to install a third-party Python package?¶
python getapt installpip installimport
Answer¶
pip install <package> downloads a package from PyPI and installs it into
your environment.
What is the official website for the Python language?¶
python.comgetpython.iopython.orgpython.dev
Answer¶
python.org is the official home of Python: downloads, documentation, and
the news that surrounds the language.
Which organization stewards the Python language today?¶
The Linux Foundation.
The Python Software Foundation (PSF).
Oracle.
The Free Software Foundation.
Answer¶
The Python Software Foundation (PSF) is the non-profit that holds the intellectual property and supports the Python community.
Which of these is a popular Python web framework?¶
Laravel.
Rails.
Django.
Spring.
Answer¶
Django is one of the best-known Python web frameworks. Laravel is PHP, Rails is Ruby, and Spring is Java.
What is the default prompt of Python's interactive interpreter?¶
$>>>#py>
Answer¶
The Python REPL prompts you with >>> for each new statement.
What does Python's logo depict?¶
A single coiled snake.
Two intertwined snakes.
A circus tent.
A blue elephant.
Answer¶
The modern Python logo shows two stylized, intertwined snakes in blue and yellow.
How does Python group blocks of code?¶
With
beginandendkeywords.With curly braces
{ }.With indentation.
With parentheses
( ).
Answer¶
Python uses indentation (leading whitespace) to define blocks, instead of braces or keywords.
Is Python case-sensitive?¶
No,
Nameandnameare the same.Yes,
Nameandnameare different.Only inside functions.
Only for built-in names.
Answer¶
Python is case-sensitive: Name, name, and NAME are three
different identifiers.
Python is best described as which kind of language?¶
A markup language.
A language that must be compiled to a standalone
.exebefore running.An interpreted, high-level language.
A hardware description language.
Answer¶
Python is a high-level, interpreted language: you run source files directly without a separate compile step.
How is typing handled in Python?¶
You must declare every variable's type.
Variables are dynamically typed.
Every variable is a string until converted.
Types cannot change once assigned.
Answer¶
Python is dynamically typed: a variable takes the type of whatever value you assign to it, and that can change over time.
What does the print() function do?¶
Sends the text to the printer.
Writes its arguments to standard output.
Saves the text to a file.
Returns the text without showing it.
Answer¶
print() writes its arguments to standard output (normally the screen),
separated by spaces and followed by a newline.
What is the name of the largest annual community Python conference?¶
PyDay.
SnakeConf.
PyCon.
DjangoCon.
Answer¶
PyCon is the flagship community conference for Python, held in many countries around the world.
What does this program print?¶
print("Hello, world!")
Hello worldHello, world!"Hello, world!"Nothing.
Answer¶
print writes its argument to the screen exactly, including the comma
and exclamation mark.
Which statement about Python's licensing is true?¶
It is proprietary and closed source.
It requires a paid license for commercial use.
It is free and open source.
It can only be used for education.
Answer¶
Python is free and open source, developed openly by the Python Software Foundation and a global community.