Question: Using python 3.6.2. python programming. this question has to be done without if and else statements/loops. please include the pic of the program on the

Using python 3.6.2. python programming. this question has to be done without if and else statements/loops. please include the pic of the program on the python shell. Thanks

Question 1)

Two numbers a and b are called pythagorean pair if both a and b are integers and there exists an integer c such that a^2 + b^2 = c^2. Write a function pythagorean_pair(a,b) that takes two integers a and b as input and returns True if a and b are pythagorean pair and False otherwise.

below are the test cases for this question to check the answer and how the answer should be printed in the python shell.

# testing Question 2 >>>

>>> pythagorean_pair(2,2) False >>> pythagorean_pair(6,2) False >>> pythagorean_pair(6,8) True >>> pythagorean_pair(300,-400) True >>>

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 Databases Questions!