BASH COMMANDS
DATA TYPES
IF/ELSE
LOOPS + LISTS
POTPOURRI
100

Command for creating a new folder

What is mkdir?

100

The four data types we know so far:

What are:

Strings

Integers

Floats

Lists ?

100

Another name for an if/else statement.

What is a conditional?

100

Name of the loop that goes through each item in a data type

What is a for loop?

100

The name of the coding environment we use for Python

What is Jupyter Notebook?

200

What pwd stands for

What is Print Working Directory?

200

What would this look like exactly in the terminal?

print("Fish" + '7')

What is  Fish7 ?

200

The three key words for a conditional statement

What are if, elif, and else?

200

What is the output of this program?

for x in range(0, 56):

    print (x)


What is 

0

1

2

...

55 ?

200

GitHub uses these two types of folders/repositories:

What are:
Local Repository

Remote Repository ?

300

I want to make a folder called Cats and make a txt file called MaineCoones inside of it. What do I write in the terminal?

mkdir Cats

cd Cats

touch MaineCoones.txt


300

What would this program output?

x = 7.5

y = int(7.5**2) + 56

print (y)

What is 112?

300

What would this program output?

fruits = ["apples", "pears," "oranges", "tomatoes", "berries"]

random = ["grapes",  "pears", "grapefruits", "pomegranates", "apples"]

for x in random:

    if x not in fruits:

       fruits.append(x)

   else:

       random.remove(x)

print (fruits)

print(random)

       

["apples", "pears," "oranges", "tomatoes", "berries", "grapes", "grapefruits", "pomegranates"]

["grapes", "grapefruits", "pomegranates"]

300

What is the output of this program if the user inputs 'Mary Sue'.

name = input("What is your name?")

for x in name:

    print name[x+1]

What is :

A

R

Y

S

U

ERROR ?

300

The reason Python is called Python

What is Monty Python?

400

 I want to see everything inside of a folder called Pringles on my Desktop and move some files into a different folder called Lays. How?


cd Pringles

ls

mv file1.txt Lays


400

What would this program output?

name = Ivy

print (name + "is awesome.")

ERROR

400

Do if/else statements require an "else"?

No

400

Describe what this does (in words).

coolestPpl = ['Ivy', 'Mary Sue', 'Mr. Paranya', 'Debby']

for person in coolestPpl:

     a = coolestPpl.index(person)

     b = a + 1

     coolestPpl[b] = coolestPpl[a]

     coolestPpl[a] = coolestPpl[b]

Swaps the names in the list.

400

The name for the act of using a function you've defined. + BONUS How do you do it?

What is calling a function?

BONUS: functionName(parameter)

500

The FULL directory path to a folder named Cats located in your Desktop.

What is  /Users/MyLaptopName/Desktop/Cats  ?

500

Name another data type that is not one of the four we already discussed.

What is 

Boolean (True/False)

Dictionaries

Sets

Tuples ?

500

What would this program output?

cool = "Debjani"

if 'Debjani' == cool:

     print (":)")    

     cool = 'Ivy'  

elif 'Ivy' == cool:

    print (":(")

What is :) ?

500

What is an ordered version of a list that contains no duplicates?

What is a set?

500

What does this program output?

list = [4, 5, 6, 7, 8]

def ConvertNum():

    for num in list:

       num = num **3

       return num


ConvertNum()

What is 64?

M
e
n
u