Warning

This page is located in archive.
Go to the latest version of this course pages.

See the general homework guidelines!

Create a text file `triangle.py`

. In it, define function `is_right(a, b, c)`

which

- accepts 3 natural numbers (positive integers) representing the side lengths of a triangle, and
- checks whether the triangle is right, i.e. the function
- returns
`True`

when the numbers`a`

,`b`

,`c`

represent side lengths of a right triangle, and - returns
`False`

otherwise.

Assume that you will always get 3 positive integers as arguments. But DO NOT ASSUME that you will get them in any specific order!

- 3 points for automatic checks
- 1 point for manual evaluation (is the code readable, did you handle incorrect inputs)

courses/be5b33prg/homeworks/right_triangle.txt · Last modified: 2018/10/17 15:56 by iscenahm