Question: Write a Python program using Python 3.6.2. The program should be saved as a text file with the extention '.py'. 1. The program should do
Write a Python program using Python 3.6.2. The program should be saved as a text file with the extention '.py'.
1. The program should do the following:
i. Assigns the values 3, 4 and 5 to the variables a, b and c, respectively. ii. Write an if statement that prints OK if a is less than b iii. Write an if statement that prints OK if c is less than b iv. Write an if statement that prints OK if the sum of a and b is equal to c v. Write an if statement that prints OK if the sum of a squared and b squared equals c squared.
2. Repeat the previous steps with the additional requirement that NOT OK is printed if the condition is false.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
