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 table, stored as a list of lists, for a negative number. It uses break, continue and a loop else to stop both loops. What does the program print?
Python ProgrammingHardHigh School (9–10)Python Basics › LoopsPCEP (Python Institute)
StemPy LabCreated by StemPy Lab

A program searches a table, stored as a list of lists, for a negative number. It uses break, continue and a loop else to stop both loops. grid = [[1, 2], [3, -4], [-5, 6]] found = 0 for row in grid: for v in row: if v < 0: found += 1 break else: continue break print(found, row, v) What does the program print?

Log in to save
← All Quizzes
← A while loop looks for a key whose value is 0. The loop has an else block, and the program then uses the counter as an index. What does the program print?A program changes one item of a list and then reads from it. 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 while loop looks for a key whose value is 0. The loop has an else block, and the program then…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 →