ScratchData LogoScratchData
Back to jkibbe's profile

T$C - Pythagorean Triples template

JKjkibbe•Created January 20, 2016
T$C - Pythagorean Triples template
0
0
9 views
View on Scratch

Instructions

Pythagorean triples describe the three integer side lengths of a right triangle. A 3-4-5 triangle is a Pythagorean Triple since a^2 + b^2 = c^2 (3^2 + 4^2 = 5^2 --> 9 + 16 = 25). Create a program that asks the user for the lengths of three sides of triangle and tells them if the three values are a Pythagorean Triple or not. 3-4-5 -- Yes, this is a Pythagorean Triple 3-4-6 -- No, this is not a Pythagorean Triple (also not a right triangle) Bonus: upgrade the program so that it can handle the side lengths given in any order (i.e. - greatest length not last entered).

Description

Hint: square the first two side lengths and add them together. Does this sum equal the hypotenuse squared? More info can be found here: https://en.wikipedia.org/wiki/Pythagorean_triple

Project Details

Project ID94766009
CreatedJanuary 20, 2016
Last ModifiedJanuary 20, 2016
SharedJanuary 20, 2016
Visibilityvisible
CommentsAllowed