HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClassesGroups

>_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
  • Blog

Account

  • Dashboard
  • My Content
  • Profile
  • Log in
© 2026 senLearn. All rights reserved.HelpAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Python Labs
  2. /Which law fits the readings?
ChemistryMediumHigh School (11–12)Chemical Kinetics

Which law fits the readings?

You will write functions that turn readings into a rate constant, first as if the reaction were zero order and then as if it were first order. Then a third function decides which order fits a set of readings.

The idea. For zero order, k=[R]0−[R]tk = \dfrac{[R]_0 - [R]}{t}k=t[R]0​−[R]​. For first order, k=1tln⁡[R]0[R]k = \dfrac{1}{t}\ln\dfrac{[R]_0}{[R]}k=t1​ln[R][R]0​​. The law that fits gives almost the same kkk at every time.

Your tasks.

  1. Complete k_zero(c0, c, t) so that it returns the rate constant of a zero order reaction.
  2. Complete k_first(c0, c, t) so that it returns the rate constant of a first order reaction.
  3. Complete order_of(times, concs) so that it returns 0 or 1, the order whose kkk values stay closer together.

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 the last reading of first_run to 0.30. What does the program say about its order 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
← Orders and rate constantsA half-life calculator →
More onChemical Kinetics

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. Barriers and catalystsEasy
  2. An Arrhenius calculatorMedium
  3. A half-life calculatorMedium
  4. Orders and rate constantsMedium
  5. Rates from a table of readingsEasy
All labs on this topic →