Python 101
Packages
Things Dr. Kelley said to remember
Code Cracker
Programming Principles
Fun Facts
100

This function is used to output text

What is print()

100

This package is widely used for numerical computing and arrays

What is numpy?

100

This is the first and easiest thing you do to debug your program

What is print out intermediately results/check the datatype of your variables?

100

x = [i**2 for i in range(6)]

What is creates a list of square numbers from 0 to 5?

100

This is a step-by-step set of instructions to solve a problem

What is an algorithm?

100
This comedy group inspired the name "Python"
Who is Monty Python?
200

This symbol is used to comment out a line of code

What is #

200

This package is known for creating static, animated, and interactive visualizations

What is Matplotlib?

200

This is everything in Python

What is indentation?

200

x=-9

if x>0
    print('hello world')

else
    print('hello sucker')

What is nothing, there is a syntax error?

200

To model uncertainty, randomness, or stochastic processes in data and systems, you should use these

What are random number generators?

200

In this year, Python was released and the Soviet Union ceased to exist

What is 1991?

300

This keyword is used to define a function

What is def?

300
This is the most commonly used package for data analysis

What is Pandas?

300

This is a sin when creating graphs

What is not labeling your axes?

300

list(filter(lambda x: x % 2 == 0, range(10)))

What is creates a list of even numbers from 0 to 9 using a lambda function filter?
300

Want to interface with a programming language? Use an IDE which stands for this

What is Integrated Development Environment?

300

Surprisingly, you can use these in variable names

What are emojis

400

This function returns the length of an object

What is len?

400

This package can generate random numbers

What is random/scipy/numpy?

400

Dr. Kelley has written this style guide suggestion many times in feedback, but half the class refuses to follow it

What is give comments their own line?

400

[x for x in range(21) if x % 3 == 0 and x % 2 == 0]

What is generates a list of numbers from 0 to 21 that are divisible by both 2 and 3?

400
Don't interpret this the wrong way, but Python is this type of language

What is an interpreted language?

400

This Python conference is held annually for enthusiasts and was most recently held in Pittsburgh

What is PyCon?

500
When doubled, this symbol does something completely different
What is =
500

This package is used for deep learning and offers tools for neural networks

What is TensorFlow/Pytorch?
500

Good advice whenever Python is giving you a weird error and you swore it was working the other day

What is restart the kernel/Python/spyder?

500

import re
pattern = r"\b[a-zA-Z]{4}\b"
text = "This is a test of regex in Python"
result = re.findall(pattern, text)

What is returns all 4 letter words: This and test?

500

This algorithm is standard in most random number generators

What is the Mersenne Twister?

500

This command will print the "Zen of Python" mantra

What is import this?