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 function asks a tuple three questions and returns the three answers together. What does the program print?
Python Programming
Easy
High School (9–10)
Python Essentials › Tuples and Sets
PCEP (Python Institute)
Created by
StemPy Lab
Stuck? Show a hint
A function asks a tuple three questions and returns the three answers together.
def info(t): return len(t), t.count(2), t.index(2) print(info((2, 4, 2, 6)))
What does the program print?
(3, 2, 0)
(4, 2, 1)
(4, 2, 0)
[4, 2, 0]
Check Answer
Log in to save
Tag someone
⚑ Report
← All Quizzes
← In the middle of a for loop, the function tally puts 10 into i. It returns a sum and i together. What does the program print?
A function adds up points for the letters of a word. Letters that are not in the dictionary get a default value. 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 →