Pendulum wave · Python

Flashcards for Python lesson 5: Formulas on arrays

Read the front, say the back to yourself, then open the card.

  • plt.subplots(1, 4)

    A figure and four plots (axes) in one row, to draw on one by one.

  • f"t = {t} s"

    An f-string: the value of t goes in place of {t}.

  • Pendulum period

    For small swings, T = 2π√(L / g): four times longer means twice as slow.

  • Phase

    Where a pendulum is within its swing; here, the cosine of 2π·t / T.

  • np.round(x, 1)

    Rounds every number of an array to one decimal place.

Back to the lesson