<jupyter_start><jupyter_text>Lab Two---For this lab we're going to get into logicOur Goals are:- Using Conditionals- Using Loops- Creating a Function- Using a Class<jupyter_code># Create an if statement

i_like_halo = True

if i_like_halo:
    print("Halo is the best video game series of all time.")
# Create an if else statement

you_like_halo = False

if you_like_halo:
    print("I see you are cultured as well.")

else:
    print("You need to reevaluate your life.")
# Create an if elif else statement

vikings_have_superbowl_win = False
packers_are_overrated = True
vikings_are_cooler = True

if vikings_have_superbowl_win:
    print("We're not cursed!")
elif packers_are_overrated and vikings_are_cooler:
    print("Maybe one day...")
else:
    print("I live in constant dissappointment.")
# Create a for loop using range(). Go from 0 to 9. Print out each number.

for value in range(10):
    print(value)
# Create a for loop iterating through this list and printing out the value.
arr = ['Blue', 'Yellow', 'Red', 'Green', 'Purple', 'Magenta', 'Lilac']

# Get the length of the list above and print it.

for items in arr:
    print(items)


print(len(arr))
# Create a while loop that ends after 6 times through. Print something for each pass.

start = 0
finish = 6

while start != finish:
    print("You gotta keep going.")
    start += 1
else:   
    print("You made it!")
    
# Create a function to add 2 numbers together. Print out the number

import random

arr = [1, 2, 3, 4, 5, 6, 7, 8, 9]

for values in arr:
    print(random.choice(arr) + random.choice(arr))
# Create a function that tells you if a number is odd or even and print the result.

for items in range(20):
    if items % 2 == 0:
        print(str(items) + ": This number is even.")
    elif items % 2 == 1:
        print(str(items) + ": This number is odd.")

    
# Initialize an instance of the following class. Use a variable to store the object and then call the info function to print out the attributes.
class Dog(object):
    def __init__(self, name: str, height: int, weight: int, breed: str):
        self.name = name
        self.height = height
        self.weight = weight
        self.breed = breed

    def info(self):
        print("Name:", self.name)
        print("Weight:", str(self.weight) + " Pounds")
        print("Height:", str(self.height) + " Inches")
        print("Breed:", self.breed)

if __name__ == "__main__":
    Bub = Dog("Bub", 34, 90, "lab")
    Bub.info()<jupyter_output>Name: Bub
Weight: 90 Pounds
Height: 34 Inches
Breed: lab
{'fraction_non_alphanumeric': 0.10704447068083432, 'fraction_numerical': 0.012593467138921684, 'mean_word_length': 3.3084745762711862, 'pattern_counts': {'":': 3, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '91830', 'license': 'MIT', 'n_tokens_mistral': 845, 'n_tokens_neox': 804, 'n_words': 327, 'path': 'JupyterNotebooks/Labs/Lab 2.ipynb', 'repo_name': 'jstoltz11/CMPT-120L-910-20F', 'size': '2541'}