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 →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data 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. Python Labs
  2. /How many common points?
MathematicsMediumHigh School (9–10)Coordinate Geometry › Circles and Conic Sections

How many common points?

You will use the discriminant to count the points where a line meets a circle, and the distance between the centres to count the points where two circles meet.

Your tasks.

  1. In common_points, return the number of common points of the line y=mx+ky = mx + ky=mx+k and the circle x2+y2=r2x^2 + y^2 = r^2x2+y2=r2, using the discriminant.
  2. Set tangent_k to the positive value of kkk for which y=2x+ky = 2x + ky=2x+k touches the circle x2+y2=45x^2 + y^2 = 45x2+y2=45.
  3. In circles_meet, return 000, 111 or 222: the number of common points of two circles with radii r1 and r2 whose centres are d apart.

Run it first, just as it is. The checker at the end prints FAIL for each task. Then do the tasks one at a time, and run the program again after each one. A Hint appears under every check that still fails.

When every line says PASS, try the line with m = 0.75 and k = 6.25. Is it a tangent to x2+y2=25x^2 + y^2 = 25x2+y2=25?

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

Have you tried it?

Do the tasks in the editor first, and run the checker after each one. Its hints help when a check fails. When you are ready, compare your code with this solution.

Log in to save
← All Labs
← Gradients and stationary pointsSectors and segments in radians →
More onCoordinate Geometry › Circles and Conic Sections

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. Name the conicEasy
  2. Ellipse and hyperbola numbersEasy
  3. Tangents, normals and focal chordsEasy
  4. Reading a parabolaEasy
  5. Radical axis, radical centre and orthogonalityEasy
All labs on this topic →