Help
Contact
For teachers and institutes
Search courses, problems, tests…
A
A
>_
StemPy Lab
Courses ▾
Problems ▾
Practice ▾
Mock Tests
Classes
Community ▾
A
A
Quizzes
/
A program unpacks a tuple into two names, and then makes a longer tuple with +. What does the program print?
Python Programming
Medium
High School (9–10)
Python Essentials › Tuples and Sets
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A program unpacks a tuple into two names, and then makes a longer tuple with
+
.
point = (3, 4) x, y = point point = point + (x * y,) print(point, point.count(4), len(point))
What does the program print?
(3, 4, (12,)) 1 3
(3, 4) 1 2
(3, 4, 12) 1 3
It stops with
TypeError
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← A program puts a new number into a list with insert(), and then asks the list two questions. What does the program print?
A theatre stores its seats in a dictionary. Each key is a tuple of a row number and a seat letter. What does the program print? →
More on
Python Essentials › Tuples and Sets
Discussion (0)
Log in
to join the discussion.
Loading…
All questions on this topic →
Problems on this topic
Write a program that swaps the values of two variables a and b in one line, without a third…
Easy
Choose a list, a tuple, a set or a dictionary for each, and give a reason in one sentence…
Easy
Three clubs have these members. Find the students who are in exactly two clubs.
Medium
How many letters does mississippi have, and how many different letters?
Medium
All problems on this topic →