General Python Flashcards
1
Q
What are three reasons Python programs are generally shorter than C programs?
A
- Python is a very high level language. The high level data types allow you to express complex operations in a single statement.
- Statement grouping is done by indentation instead of beginning and ending brackets.
- No variable or argument declarations are necessary.
2
Q
Where does Python get it’s name?
A
From the BBC show, “Monty Python’s Flying Circus”
3
Q
Is Python an interpreted language?
A
Yes, which means you can interact with it in real time as it does not need to be compiled.
4
Q
Where is the Python interpreter usually located?
A
/usr/local/bin/python
if you put /usr/local/bin in your Unix search path, you can invoke the interpreter by typing “python”
5
Q
What does typing CTRL-D into the primary prompt of the python interpreter do?
A
CTRL-D is an end-of-file character which tells the interpreter to exit with a status of 0