Class 38 — November 20
Image manipulation
Look both ways
Agenda
PyCharm gotchas
- When you paste a URL in reaction to a prompt, you must also type a space at the end of the line. Do not add a space at the beginning of the line.
- If your pasting URL has https://... rather than http://..., remove the s before hitting the enter key.
Download if not already gotten
To do
For extra credit onsider algorithm tenth( a, b, w, h )
for warp.py
- Determine
( mx, my )
— the center spot of a picture of dimension w
by h
- Determine the distance
d1
of ( mx, my )
to ( 0, 0 )
- Determine distance
d2
of ( a, b )
to ( mx, my )
- Determine to one decimal point the ratio
r
of d2
to d1
(hint: check out built-in function round()
- Return the max of
( 1 - r )
and 0.01
Three thousand words