Class 28 — Wednesday March 27

Tasty problem solving

Winning strategy — Mindful collaboration — Doing it today


Look both ways


Agenda


You got to see it, to believe it


Example de jeur — module beanery


Function volume( a, b )

jelly bean formula

To make your calculation as accurate as possible, use Python's estimate of π when needed.

volume( 1.3 , 0.7 ): 0.41691552507014545

volume( 2.0 , 1.0 ): 1.3089969389957472


Function count( s, j, f )

jelly beans

j f / s ;

where the operators are the mathematical symbols for rounding down to the nearest integer.

count( 0.42 , 125 , 0.7 ): 208

count( 1.31 , 500 , 0.6 ): 229


Function guess( a, b, j )

guess( 1.3 , 0.7 , 125 ): 209

guess( 2.0 , 1.0 , 500 ): 266

guess( 1.52 , 0.9 , 1550 ): 1342


To do