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
  • Computer 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. /Assigning infrared bands
ChemistryMediumHigh School (11–12)Spectroscopy and Structure Determination

Assigning infrared bands

You will write a small program that reads a list of infrared bands and names the groups they may come from, and one that finds a wavenumber from the spring model.

The idea. Each group absorbs in a known range. A band inside a range points to that group. The spring model gives ν~=130.28k/μ\tilde{\nu} = 130.28\sqrt{k/\mu}ν~=130.28k/μ​.

Your tasks.

  1. Complete groups_for(band). It returns the list of names in TABLE whose range holds the band.
  2. Complete reduced_mass(m1, m2).
  3. Complete wavenumber(k, m1, m2), rounded to a whole number.

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 bands 3350, 2960 and 1050. Which compound class do they suggest?

StemPy LabContributed by StemPy Lab
python
Loading Python runtime…

A worked solution

Run your code once to unlock the 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
← A formula from a mass spectrumBuilding a multiplet →
More onSpectroscopy and Structure Determination

Discussion (0)

Log in to join the discussion.

Loading…

More labs on this topic

  1. Formulas that fit a molecular massMedium
  2. Beer-Lambert calculationsEasy
  3. From integrals to proton countsMedium
  4. Building a multipletEasy
  5. A formula from a mass spectrumEasy
All labs on this topic →