HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →
Live examsInternational live exams are comingTell us which exam you want first. Timed practice papers are open now.See what is coming →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Space Science and Astronomy
  • Earth and Environmental Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Quizzes
  2. /A program searches a list of tuples for a number whose double is 5. If the search fails, it reports the last tuple it saw. What does the program print?
Python ProgrammingMediumHigh School (9–10)Python Basics › LoopsPCEP (Python Institute)
StemPy LabCreated by StemPy Lab

A program searches a list of tuples for a number whose double is 5. If the search fails, it reports the last tuple it saw. pairs = [(1, "a"), (2, "b"), (3, "c")] for n, ch in pairs: if n * 2 == 5: print("found", ch) break else: print("none", n, ch) What does the program print?

Log in to save
← All Quizzes
← A program checks a basket, which is a list, before it adds a fruit. What does the program print?A shop keeps its stock in a dictionary. A loop lists the items that are running low. What does the program print? →
More onPython Basics › Loops

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. In the middle of a for loop, the function tally puts 10 into i. It returns a sum and i together.…Hard
  2. A function should return the largest number of a list. For a list of negative numbers it gives the…Medium
  3. A while loop asks the function more whether to go on. That function also shows the number it was…Medium
  4. A function puts new numbers at the end of a list while a for loop runs over range(len(vals)). What…Medium
  5. A program searches a table, stored as a list of lists, for a negative number. It uses break…Hard
All questions on this topic →

Problems on this topic

  1. This loop should show the even numbers from 2 up to and including 10…Medium
  2. Write a program that asks for a password, again and again, until the user types python123…Medium
  3. Find the first number from 100 upwards that can be divided by both 6 and 8…Easy
  4. Asha saves 45 rupees every week, and has 0 at the start…Easy
All problems on this topic →