Complete the code to check if 5 is in the set.
numbers = {1, 3, 5, 7}
if 5 [1] numbers:
print("Found 5")The keyword in checks if an item is in a set.
Complete the code to check if 'apple' is NOT in the set.
fruits = {'banana', 'orange', 'grape'}
if 'apple' [1] fruits:
print("Apple is missing")The keyword not in checks if an item is NOT in a set.
Fix the error in the code to correctly test membership.
colors = {'red', 'blue', 'green'}
if 'yellow' [1] colors:
print("Yellow found")
else:
print("Yellow not found")Use in to check if 'yellow' is in the set.
Fill both blanks to create a set of squares for numbers greater than 3.
squares = {x[1]2 for x in range(1, 7) if x [2] 3}Use ** to square numbers and > to filter numbers greater than 3.
Fill all three blanks to create a set of uppercase words longer than 4 letters.
result = {word[1] for word in words if len(word) [2] 4 and word.isalpha() [3] True}Use .upper() to convert words to uppercase, > to check length greater than 4, and == to check if isalpha() returns True.
