If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

Procedures with parameters

AP.CSP: AAP‑3 (EU), AAP‑3.A.3 (EK), AAP‑3.A.5 (EK), AAP‑3.C (LO), AAP‑3.C.1 (EK)

Problem

Kash is writing code to calculate formulas from his physics class. He's currently working on a procedure to calculate average speed, based on this formula:
start text, A, v, e, r, a, g, e, space, s, p, e, e, d, end text, equals, start fraction, start text, T, o, t, a, l, space, D, i, s, t, a, n, c, e, end text, divided by, start text, T, o, t, a, l, space, T, i, m, e, end text, end fraction
Which of these is the best procedure for calculating and displaying average speed?
Choose 1 answer:
Stuck?
Stuck?