ITADN

Chapter 2, Pythagorean theorem

#468Openchasm 创建于 2024-05-31
C
chasmcommented
The Pythagorean theorem is `a^2 + b^2 = c^2`. `w` and `h` are bad choices and confused me as they appear to represent height and width, not the two sides of a right triangle. So I suggest that you change the exercise to expect this, to be clearer: ```ps diagonal a b = sqrt (a * a + b * b) ```
0 条评论