print("Ready, set, GO!") # insert your code here x = 2 print(x) print(x * x) print(x == x) print(x > 6) book = "The Lord of the Flies" print(book) # not recommended... banana = "The Lord of the Flies" print(banana) number_of_books = 100 number_of_books = number_of_books + 1 print(number_of_books) number_of_books += 5 print(number_of_books) book = "The Lord of the Flies" reading = book print(reading) # insert your code here print(name) book = "The Lord of the Flies" print(name + " likes " + book + "?") first_letter = name[0] print(first_letter) last_letter = name[# fill in the last index of your name (tip indexes start at 0)] print(last_letter) last_letter = name[-1] print(last_letter) print(len(name)) print(name[len(name)-1]) but_last_letter = # insert your code here print(but_last_letter) first_two_letters = name[0:2] print(first_two_letters) without_first_two_letters = name[2:] last_two_letters = name[-2:] print(last_two_letters) middle_letters = # insert your code here print(middle_letters) word1 = "human" word2 = "opportunities" # insert your code here sentence = "Python's name is derived from the television series Monty Python's Flying Circus." first_word = sentence[0] print(first_word) words = sentence.split() print(words) first_word = # insert your code here print(first_word) #start with an empty list good_reads = [] good_reads.append("The Hunger games") good_reads.append("A Clockwork Orange") print(good_reads) good_reads[0] = "Pride and Prejudice" print(good_reads) # insert your code here print(good_reads) name = "Pythen" name[4] = "o" good_reads = ["The Hunger games", "A Clockwork Orange", "Pride and Prejudice", "Water for Elephants", "The Shadow of the Wind", "Bel Canto"] good_reads.remove("Water for Elephants") print(good_reads) good_reads.remove("White Oleander") # insert your code here #first we specify two lists of strings: good_reads = ["The Hunger games", "A Clockwork Orange", "Pride and Prejudice", "Water for Elephants", "The Shadow of the Wind", "Bel Canto"] bad_reads = ["Fifty Shades of Grey", "Twilight"] all_reads = good_reads + bad_reads print(all_reads) good_reads.sort() print(good_reads) nested_list = [[1, 2, 3, 4], [5, 6, 7, 8]] print(nested_list[0]) print(nested_list[0][0]) good_reads = [] good_reads.append(["Pride and Prejudice", 8]) good_reads.append(["A Clockwork Orange", 9]) # insert your code here my_dict = {"book": "physical objects consisting of a number of pages bound together", "sword": "a cutting or thrusting weapon that has a long metal blade", "pie": "dish baked in pastry-lined pan often with a pastry top"} description = my_dict["sword"] print(description) good_reads = {} good_reads["Pride and Prejudice"] = 8 good_reads["A Clockwork Orange"] = 9 # insert your code here good_reads.keys() good_reads.values() print("2 < 5 =", 2 < 5) print("3 > 7 =", 3 >= 7) print("3 == 4 =", 3 == 4) print("school == homework =", "school" == "homework") print("Python != perl =", "Python" != "perl") good_reads["Folgert's awesomeness"] book = "A Clockwork Orange" if book in good_reads: print(book + " is in the collection") print("A lot more") print("Still more to come") else: print(book + " is NOT in the collection") book in good_reads "A Clockwork Orange" in good_reads if "A Clockwork Orange" in good_reads: print("Found it!") if book in good_reads: print("Found it!") "a" in "banana" "z" in "banana" word = "rocket science" if "a" in word: print(word + " contains the letter a") elif "s" in word: print(word + " contains the letter s") else: print("What a weird word!") # insert your code here word = "banana" if "a" in word and "b" in word: print("Both a and b are in " + word) if "a" in word and "z" in word: print("Both a and z are in " + word) word = "banana" if "a" in word and "z" in word: print("Both a and b are in " + word) if "a" in word and "z" in word: print("Both a and z are in " + word) # insert your code here if "z" not in word: print("z is not in " + word) numbers = [1, 2, 3, 4] if numbers: print("I found some numbers!") numbers = [] if numbers: print("I found some numbers!") numbers = [] # insert your code here numbers = [] # insert your code here for letter in "banana": print(letter) colors = ["yellow", "red", "green", "blue", "purple"] for whatever in colors: print("This is color " + whatever) for book in good_reads: print(book) good_reads.items() for x, y in good_reads.items(): print(x + " has score " + str(y)) for book in good_reads: print(book, "has score", good_reads[book]) len("banana") colors = ["yellow", "red", "green", "blue", "purple"] # insert your code here colors = ["yellow", "red", "green", "blue", "purple"] colors_with_r = [] # insert you code here frequency_distribution = {"Beg": 1, "Goddard's": 1, "I": 3, "them": 2, "absent": 1, "already": 1, "alteration": 1, "amazement": 2, "appeared": 1, "apprehensively": 1, "associations": 1, 'clever': 1, 'clock': 1, 'composedly': 1, 'deeply': 7, 'do': 7, 'encouragement': 1, 'entrapped': 1, 'expressed': 1, 'flatterers': 1, 'following': 12, 'gone': 9, 'happening': 4, 'hero': 2, 'housekeeper': 1, 'ingratitude': 1, 'like': 1, 'marriage': 15, 'not': 25, 'opportunities': 1, 'outgrown': 1, 'playfully': 2, 'remain': 1, 'required': 2, 'ripening': 1, 'slippery': 1, 'touch': 1, 'twenty-five': 1, 'ungracious': 2, 'unwell': 1, 'verses': 1, 'yards': 5} number_of_as = 0 # insert your code here from IPython.core.display import HTML def css_styling(): styles = open("styles/custom.css", "r").read() return HTML(styles) css_styling()