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 starts with two import lines. Each option below is then run as the next line of the program, on its own. Which lines run with no error? Choose every correct option.
Python ProgrammingMediumHigh School (11–12)Python Essentials › Modules and LibrariesClass 12 BoardPCAP (Python Institute)
+1 more exams
AP
APPCAP (Python Institute)
StemPy LabCreated by StemPy Lab

A program starts with two import lines. Each option below is then run as the next line of the program, on its own. import math as m from math import sqrt as root Which lines run with no error? Choose every correct option.

One or more options are correct. Tick all the correct ones: a wrong option costs marks, and a part-right answer earns part of the marks.

Log in to save
← All Quizzes
← The file words.txt holds three lines, red, green and blue, each with a new line at its end. A program reads part of it with read, then loops over the rest. What does the program print?A program imports the random module and then uses its name again for a number. What happens when the program runs? →
More onPython Essentials › Modules and Libraries

Discussion (0)

Log in to join the discussion.

Loading…

More questions on this topic

  1. Inside the folder kit there are two files: an __init__.py that sets a version number, and a module…Advanced
  2. A folder holds main.py, a module util.py, and a subfolder lib with another module, also called…Hard
  3. A program imports the math module and tests five results of its functions. Which of these…Hard
  4. A program imports the random module and then uses its name again for a number. What happens when…Medium
  5. The program is saved as main.py and run with the command python main.py, with nothing typed after…Hard
All questions on this topic →

Problems on this topic

  1. A shop sells these items on one day, with the prices [20, 25, 25, 30, 22, 28, 400]…Easy
  2. Roll two dice 6000 times, with the seed 3…Medium
  3. Which module would you use for each job? …Easy
  4. Find out, with dir and help, which function of math gives the sine of an angle, and which gives the…Easy
All problems on this topic →