Python Flashcards
Why Python to learn as a beginner?
It’s syntax is relatively simple and you don’t have to worry about things like static syntax and compilation time
What is homebrew?
It is a package manager that helps us install software on our operating system
Who created Python?
Guido Van Rossum in 1991
What are some popular libraries?
NumPy, SciPy, BeautifulSoup, Scrapy, Twisted, Django
How does Python know how to run code?
Indentation…tab or four spaces…DO NOT MIX UP
How would you do Python for 1 to 255
def print1to255(): for i in range(1, 256): print i
Why version 2.7 and not 3.6?
Porting code over is easy, but going backwards is not so easy
What is a web server?
A computer system that processes HTTP requests
Why are companies using 2.7?
There are many reasons why this is the case, the primary being the expense of switching all of a company’s code base from one version to another
What is the Python shell?
The python shell is a command line interface we can use to interact with the Python interpreter. Once activated, we can type some Python code and see the results immediately.
If I divide 31/2 on the python shell command line, what is the result?
15, most programming languages treat integers (whole numbers) and floating point numbers, or floats (decimal numbers) differently. If you divid an integer by an integer, the result will always be an integer rounded down
Do you need to utilize var to declare a variable in Python?
No
What is a list in Python?
A list is an array
How can we comment out code in Python?
Using either # for single line, or triple quotes (double or single) for multiple lines UNLESS it’s the first line of code.
What are data types?
Data types refers to how the computer knows to classify information.