(sqrt (+ (* 3 3) (* 4 4))) = (sqrt (+ 9 (* 4 4))) = (sqrt (+ 9 16)) = (sqrt 25) = 5The red part is called the reducible expression. You may wish to underline those in your homework by hand.
(cond ((zero? (sqrt 16)) #f) (else (+ 3 10)))
(cond ((and (zero? 0) (> 17 0)) #f) (else (+ (sin 0) (* (cos 1.3) (cos 1.3)))))
(cond ((sqrt 16) #f) (else (+ 3 10)))
;; experiment : number -> number (define (experiment t) (cond [(< t 0) 0] [(> (distance t) 200) 200] [else (distance t)])) ;; distance : number -> number (define (distance t) (* 1/2 t t G)) ;; G : gravitational acceleration (define G 9.81)what are the results of
(experiment 5) (experiment -1) (experiment 20)
Your physics consultant advises: Newton figured out that if an object accelerates at a (meter/second) per second [that is, "(miles per second) per second" for Libyans and Americans], it travels
.5 * a * t * t
meters [miles] in t seconds and reaches a speed of
a * t
meters per second [miles per second] in the same time span.
Hint: Use several helper functions to make your program more readable.