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. /Inverse and composite checks
MathematicsMediumHigh School (9–10)Functions and Calculus › Composite and Inverse Functions

Inverse and composite checks

You will test an inverse function, build a composite, and find where a composite exists.

Your tasks.

  1. In f_inverse, return the inverse of f(x)=x+4x−3f(x) = \dfrac{x + 4}{x - 3}f(x)=x−3x+4​, which is 3x+4x−1\dfrac{3x + 4}{x - 1}x−13x+4​.
  2. In compose, return a function that does inner first and then outer.
  3. With f(x)=x−5f(x) = x - 5f(x)=x−5 and g(x)=xg(x) = \sqrt{x}g(x)=x​, set least to the smallest whole number xxx from 000 to 202020 for which f(x)f(x)f(x) is allowed in ggg, so that gf(x)gf(x)gf(x) exists.

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, change f to x - 9. What is least now?

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
← Range and one-one by testingModulus equations by cases →
More onFunctions and Calculus › Composite and Inverse Functions

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. A function and its mirror imageMedium
  2. Which comes first?Easy
  3. Gradients and stationary pointsEasy
  4. Powers, logarithms and a change of baseMedium
  5. A hidden quadratic and a cubic inequalityMedium
All labs on this topic →