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. Python Programming
  2. /Python for Science and Maths

Python for Science and Maths

Python Programming · High School (11–12) · 12 courses, 122 worked problems, 240 practice questions

Python is a working tool in science and mathematics, and this area uses it to calculate, plot and model real problems. NumPy arrays handle many numbers at once. Graphs with matplotlib show patterns in data, and data analysis with pandas works with tables. Solving equations and calculus by computer turn hard mathematics into steps that a program can follow. Trigonometry and waves by computer draws and adds waves, and simulation and randomness models chance events. Chemistry by computer and biology by computer apply the same tools to moles, growth and genetics.

With practice you will be able to

  • Do calculations on whole arrays of data with NumPy
  • Plot data and formulas as clear, labelled graphs
  • Build a simple model and run it as a simulation

On the syllabus of

  • CBSE / State Class 12
  • AP

Parts of this topic

  • NumPy Arrays
  • Graphs with matplotlib
  • Solving Equations
  • Calculus by Computer
  • Simulation and Randomness
  • Data Analysis with pandas
  • Chemistry by Computer
  • Biology by Computer
  • Trigonometry and Waves by Computer

Lessons

  • Angles, the Unit Circle and Trigonometric GraphsWhy is sin(π) not exactly 0 in Python? Is sin(a + b) the same as sin a + sin b?High School (11–12)
  • Waves by Computer: Adding and FittingWhy do two close notes make beats? How can a fast wave look slow?High School (11–12)
  • Growth and Populations by ComputerWhy can no population keep doubling for ever? How do you read growth from scattered counts?High School (11–12)
  • Genetics by ComputerWhy do pea crosses give 3 tall to 1 short? Why do small samples miss that ratio?High School (11–12)
  • Moles and Reactions by ComputerHow can code read the brackets in Ca(OH)₂? Which reactant runs out first?High School (11–12)
  • The Periodic Table as DataWhich elements break the rising trend across a period? How does the radius change?High School (11–12)

All 12 courses on Python for Science and Maths →

Practice questions

Choose an answer, then check it. Each one shows a full explanation.

A sprinkler arm turns through 84 degrees. What does this print? import math; print(round(math.radians(84), 3))

An angle of 2.2 radians is changed to degrees. What does this print? import math; print(round(math.degrees(2.2), 1))

Which call gives the sine of an angle of 35 degrees?

A loop prints cosines of three angles. What does this print? import math; print(*[round(math.cos(math.radians(d))) for d in (0, 90, 180)])

A program draws y = 6 * np.sin(4 * x - 1). What is the amplitude of the wave?

A list of angles in degrees. What does this print? import numpy as np; x = np.arange(0, 181, 30); print(len(x), x[-1])

Why is the tangent changed with t[np.abs(t) > 8] = np.nan before it is plotted?

A check of an identity on three angles. What does this print? import numpy as np; a = np.radians(np.array([10, 20, 30])); print(np.allclose(np.sin(a) ** 2 + np.cos(a) ** 2, 1))

Why compare np.sin(a) ** 2 + np.cos(a) ** 2 with 1 using np.allclose and not ==?

The true sine of a sum and the false rule, side by side. What does this print? import numpy as np; a, b = np.radians(25), np.radians(65); print(round(float(np.sin(a + b)), 2), round(float(np.sin(a) + np.sin(b)), 2))

All 240 practice questions on Python for Science and Maths →

Worked problems

Each one has a hint, the key idea and a full worked solution.

  • The minute hand of the clock tower in Rahim's town turns through 150° in 25 minutes…Easy
  • Maya prints the six ratios of the angles 0°, 15°, 30°, …, 90°…Easy
  • Ajay writes if math.sin(math.pi) == 0: and the program does not take the branch…Medium
  • A point is at an angle of 250° on the unit circle…Medium
  • A program draws the wave y = 4 * np.sin(5 * x) for x from 0 to 2π…Easy
  • The wave y = 2 sin(x - 0.8) is shifted to the right…Medium
  • Asha plots tan x for x from 0 to 4π. How many asymptotes does the graph have in that range? …Hard
  • Bhavna sets x = np.linspace(0, 360, 721) and plots np.sin(x), meaning to draw one turn in degrees…Medium
  • A student guesses three formulas for cos 2a: 2 cos² a - 1, 1 - 2 sin² a and 2 cos a…Medium
  • Chandra checks 1 + tan² a = 1/(cos² a) on the angles 0°, 15°, 30°, …, 345°…Medium
  • Dev tries the rule sin(a + b) = sin a + sin b with a = 20° and b = 50°…Easy
  • A wave on a rope has a wavelength of 1.5 m and a frequency of 4.0 Hz…Easy

All 122 worked problems on Python for Science and Maths →

Python labs

  • An angle toolkit
  • An identity checker
  • A wave and its speed
  • Fit a noisy sine
  • A population stepper
  • Fitting growth curves