Question: python 5 star rating 1. Write Python code that does the following: (15 points) a. Assigns the values 3, 4 and 5 to the variables
1. Write Python code that does the following: (15 points) a. Assigns the values 3, 4 and 5 to the variables a, b and c, respectively. b. Write an if statement that prints "OK" if a is less than b c. Write an if statement that prints "OK" if c is less than b d. Write an if statement that prints "OK" if the sum of a and b is equal to c e. Write an if statement that prints "OK" if the sum of a squared and b squared equals c squared. 2. Repeat the previous problem with the additional requirement that "NOT OK" is printed if the condition is false. (15 points)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
