Complete the code to create a tuple with three numbers.
my_tuple = (1, 2, [1])
The tuple elements must be separated by commas and can be numbers. Here, 3 is the correct third element.
Complete the code to create a tuple with a single element.
single_element_tuple = ([1],)To create a tuple with one element, you must include a comma after the element inside parentheses.
Fix the error in the tuple creation code.
my_tuple = [1] 1, 2, 3)
The tuple must start with a single opening parenthesis '('. Double parentheses or other brackets cause syntax errors.
Fill both blanks to create a tuple with two strings.
names = ([1], [2])
Strings in tuples must be enclosed in quotes. So both elements need quotes around the names.
Fill all three blanks to create a tuple with mixed types: string, integer, and float.
mixed = ([1], [2], [3])
The tuple contains a string (with quotes), an integer, and a float. All elements must be correctly typed.