Complete the code to assign a string to the variable.
message = [1]The variable message is assigned a string value using quotes.
Complete the code to change the variable type from int to float.
number = 10 number = [1](number)
str() which converts to text, not a number.bool() which converts to True or False.The float() function converts an integer to a floating-point number.
Fix the error by completing the code to add a number to a string correctly.
age = 30 message = "I am " + [1] + " years old."
int() or float() does not convert to string.You must convert the number age to a string before adding it to another string.
Fill both blanks to create a list of squares for numbers greater than 3.
squares = [x[1]2 for x in range(1, 6) if x [2] 3]
+ instead of power operator.< instead of > for filtering.The ** operator is used for power, and > filters numbers greater than 3.
Fill all three blanks to create a dictionary with uppercase keys and values greater than 0.
result = {{ [1] }}: [2] for [3], v in data.items() if v > 0}item.Keys are converted to uppercase with k.upper(), values are v, and k is the key variable.
