Question: Part 2 . An Euler Brick is an a b c cuboid where the dimensions a , b , c are positive integers, as are

Part 2. An Euler Brick is an a b c cuboid where the dimensions a, b, c are positive integers,
as are the diagonals of each face. The first, (44,117,240), was discovered in 1719 by Paul Halcke.
(a) Write a function IsItEuler(triple1,triple2) which accepts as input two tuples repre- senting distinct Pythagorean triples and returns True if together they describe two faces of an Euler Brick, and False otherwise. For example the inputs (44,117,125),(117,240,267) should return True, as should (117,240,267),(117,44,125), etc..
(b) Write a function Bricks(n) to return a list of Euler bricks (a, b, c) where 0< a < b < c < n. Hint: Use your functions Pyth and IsItEuler.
(c) How many Euler bricks are there with all dimensions <1000? How many of them are primitive? Write your answer as a comment, explaining what a primitive Euler brick is.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!