top of page

Python Class Curriculum and Resources

Updated: Dec 30, 2021

As software becomes a more and more integral part of daily life, being able to not only use these tools, but also to create using them is essential. This article will include the curriculum for my python class and some other resources you can use to hone your skills and knowledge. I teach a python class every Monday - Thursday at 9:00 AM EST. If you are interested in joining you can sign up by submitting an application at https://www.wequil.school/


Curriculum

Printing

The print function in Python is used to output something.


print(“name”)

Output -> name



What Integers, Variables, Lists, Strings are


Integers -> Numbers

Strings -> Words with “”

Variables -> A place where you can store data

List -> A type of data that allows you to store multiple things


For example:


Integer: 2

String: “Hello”

Variable: name = “Sally”

List: list1 = [1, 3, 5, 2, 4]


How would you print Integers, Variables, Lists, and Strings?


Integers: print(______[write in integer, no “”])

Variables: print(_______[write in variable, no “”])

Strings: print(“______”[You can write in anything you want as long as it’s in quotes])

Lists: print(_______[Write the variable to store in the list]])


Examples:


Printing Integers:


print(2)


Printing Varibles:


name = "Sally"


print(name)


Printing Strings:


print("Hello")


Printing Lists:


List1 = ["hi", "this", "is", "a", "list"]


print(List1)


Input()


What is input?


→ Input is when the user gets to choose



For example:


print(“Which color do you like best? Pink or blue.”)


Color = input()


print(“What is your name?”)


Name = input()


print(“Hello, my name is ” + Name + “. And I like the color ” + Color + “!”)


Output:

→ Hello my name is Sumay. And I like the color blue!


As you can see input() is really cool! Let’s see if we can expand on it!


Indexes


Food = [“Apple”, “Banana”, “Peach”, “Watermelon”, “Kiwi”]

^ ^ ^ ^ ^

0 & -5 1 & -4 2 & -3 3 & -2 4 & -1


Indexes: They point to a specific element in a list


Indexes in Python always start with 0


Positives:

print(Food[0]) —> Apple


print(Food[1]) —> Banana


print(Food[2]) —> Peach


print(Food[3]) —> Watermelon


print(Food[4]) —> Kiwi



Negatives:


print(Food[-5]) —> Apple


print(Food[-4]) —> Banana


print(Food[-3]) —> Peach


print(Food[-2]) —> Watermelon


print(Food[-1]) —> Kiwi




Printing with +

Sometimes you want to print multiple things in one print statement. This is made possible by using a + sign in your print statements!


Word = "Carrots"


print("My favorite food is " + Word + ".")

Output → My favorite food is Carrots.


--


Numbers = [1,2,3]

Numbers2 = [4,5,6]


print(Numbers + Numbers2)

Output->[1,2,3,4,5,6]


all_numbers = (Numbers + Numbers2)


print(“These are some of the numbers I know! ” + all_numbers)

Output->These are some of the numbers I know! [1,2,3,4,5,6]


len()



len() it counts how many items are in a list.


Number = [1,2,3,4,5,6,”Hello”]


print(len(Number))

Output —> 7


Food = [“Pizza”, “Cookie”, “Orange”]


print(len(Food))

Output -> 3




Append


Monkey = [“M”, ”o”, ”n”, ”k”, ”e”]

Monkey.append(“y”)

That adds to the list so it has the word “monkey”.


print(Monkey)

Output —> ['M', 'o', 'n', 'k', 'e', 'y']





Del()


Del() is used to delete things from a list.


Syntax:

del(list name[index])


x = [1,2,3,4,6,”hello”]


print(x)

Output —> [1,2,3,4,6,’hello’]


I wanna delete 6


del(x[4])


print(x)

Output —> [1,2,3,4,’hello’]


len(x)

Output—> 5



If and Else Statements