Interactive, runnable Python. Edit the code, run it in your browser, no setup required.
You will write four functions for the pendulum and the straight-line graph. They follow the least-squares formulas of the lesson. The idea. The line y = mx + c through the points has the slope m = (nΣ xy - Σ xΣ y)/(nΣ…
You will write functions for the standard calculations of surface tension and viscosity. One finds the rise of a liquid in a tube. One finds the excess pressure in a bubble. One finds the steady speed of a falling bal…
You will write a function for the mean of a table with one unknown frequency. Then you will search for the value that gives a target mean, and check whether an answer exists. The idea. The mean is (Σ fx)/(N) with both…
You will count the eggs of a female cockroach, find the adults that you expect, and follow the length of a nymph through its moults. The idea. The eggs are the oothecae times the eggs in each. A nymph grows by a facto…
You will fit a sine to 60 noisy readings of a swinging spring, with a first guess from the FFT. The idea. The FFT finds the main frequency to within one bar. curve_fit then refines the amplitude, the frequency and the…
You will build a function that summarises any list of numbers: how many, the mean, the median, the range and a chance. Then it summarises the month, and the definition of a hot day is yours to choose. The idea. A summ…
You will write four small functions that work out a reading of the vernier calipers or the screw gauge. They follow the rules of the lesson. The idea. A vernier has a least count of one main scale division divided by…
You will write functions for the Clausius-Clapeyron equation. One finds the vapour pressure at a temperature. One finds the boiling point at a pressure. One finds the enthalpy of vaporisation from two measurements. On…
You will write functions that build the less than and the more than cumulative frequencies of a table, and one that reads a curve. The idea. The less than total at the upper limit of a class is the running total. The…
You will place the parts of the alimentary canal in their regions, add the times that food spends in the parts, and find the part where the food stays longest. The idea. The alimentary canal has a foregut, a midgut an…
You will draw a wave of wavelength 3.0 m and frequency 4.0 Hz at two times, find its first crest each time, and work out its speed. The idea. The crest of y = A(kx - ω t) moves at the speed v = fλ. You find where the…
The month of 30 days is in two lists: the temperatures and the rainy days. You will split the temperatures into rainy and dry days, and count how many days had each temperature. Then the program draws a line graph wit…
You will write three small functions for the force of light on a surface. Use c = 3.00 × 10^8 m/s. The idea. Light of intensity I falls on an area A. If a fraction ρ of it is reflected, the force along the normal is F…
You will write functions for a van der Waals gas. One finds the pressure. One finds the compressibility factor. One finds the critical constants. One finds the Boyle temperature. Use the units L, bar and K, with R = 0…
You will write a function for the mode of grouped data. Then you will use the rule of thumb and measure how far it is from the formula. The idea. The mode of grouped data is l + (f_1 - f_0)/(2f_1 - f_0 - f_2) × h for…
You will time an impulse along a nerve fibre, choose the speed for a kind of fibre, and compare two fibres. The idea. Time is distance divided by speed. A large myelinated fibre conducts at about 100 m/s, and an unmye…
You will write three small functions that check a claimed identity on many angles: one finds the worst miss between the two sides, one says whether the identity holds, and one finds an angle where it fails. The idea.…
You will find the exact probability of each sum of two dice by listing the 36 pairs, then roll two dice 3,600 times and compare. The program draws both side by side. The idea. The exact probability counts equally like…
You will write three small functions for the fields of a beam. Use _0 = 8.85 × 10^-12 C^2/(N m^2) and c = 3.00 × 10^8 m/s. The idea. A point source of power P has the intensity P/4π r^2 at distance r. The peak electri…
You will write functions for the three speeds of a gas and for the fast tail of the Maxwell distribution. The molar mass is given in g/mol, as in a data table, and the functions must change it to kg/mol themselves. Th…
You will write functions that build the cumulative frequencies of a table and find its median. The idea. The cumulative frequency is a running total. The median class is the first class whose total reaches (N)/(2), an…
You will find the blood pumped in a minute, count the beats in some minutes, and name a muscle from its features. The idea. Cardiac output is the heart rate times the stroke volume. One litre is 1000 mL. Your tasks. F…
You will write three small functions for angles: one that converts degrees to radians without math.radians, one that finds the quadrant of an angle, and one that returns the point of the unit circle at an angle. The i…
You will toss a coin 500 times in a program, keep the share of heads after every toss, and draw how that share moves. Then you see how close the last share comes to 0.5. The idea. The share of heads jumps about in a s…
You will write three small functions about the heat and the radio waves of the sky. The idea. A body at temperature T shines most strongly at λ_peak = b/T with b = 2.898 × 10^-3 m K. A layer of the ionosphere with N e…