Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Python Do all of the items below and submit a text file that is named, if your name is Harry Houdini, for example, HW2_HarryHoudini.py via

Python image text in transcribed
Do all of the items below and submit a text file that is named, if your name is Harry Houdini, for example, HW2_HarryHoudini.py via Canvas. 1. Write Python code that does the following: 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. (25pts)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Mining Concepts And Techniques

Authors: Jiawei Han, Micheline Kamber, Jian Pei

3rd Edition

0123814790, 9780123814791

More Books

Students also viewed these Databases questions

Question

3. What changes should I be making?

Answered: 1 week ago

Question

2. Why?

Answered: 1 week ago