For loops with lists
Going off our attendance sheet example when we learned what lists are… …let’s imagine that we need to call attendance for the class. To do … Read More
Going off our attendance sheet example when we learned what lists are… …let’s imagine that we need to call attendance for the class. To do … Read More
Working off of program we created while learning While loops… i = 0 while i <= 3: print(i) i += 1 …let’s imagine that we removed the … Read More
In order to learn what nested conditionals actually are, check out this template code: if condition: if condition: code to be executed if condition is true Notice … Read More
When learning elif statements, we utilized “or”… state = input(“What state do you live in?”) if state == “Ohio”: print(“You live in the Midwest.”)elif state == “California” … Read More
When learning if statements, we utilized “==”… state = input(“What state do you live in?”) if state == “Ohio”: print(“You live in the Midwest.”) …to determine whether … Read More
Essentially, a conditional is a switch. For example, imagine a machine that has 3 buttons: Conditionals can do this same exact thing through the use … Read More
Going off our for loop we coded to call attendance… names = [“Peter”, “Lila”, “Alex”, “Bella”] for x in names: print(x) …what if we also wanted … Read More