General Python Flashcards

1
Q

What are three reasons Python programs are generally shorter than C programs?

A
  1. Python is a very high level language. The high level data types allow you to express complex operations in a single statement.
  2. Statement grouping is done by indentation instead of beginning and ending brackets.
  3. No variable or argument declarations are necessary.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Where does Python get it’s name?

A

From the BBC show, “Monty Python’s Flying Circus”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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”

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

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