Question: 1. Write Python code that does the following: a. Assigns the values 3,4 and 5 to the vatiables a b and c respectively. b. Write

 1. Write Python code that does the following: a. Assigns the
values 3,4 and 5 to the vatiables a b and c respectively.

1. Write Python code that does the following: a. Assigns the values 3,4 and 5 to the vatiables 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. 3. Write a program that asks the user for a color, a line width, a line length and a shape. Assume that the user will specify a shape that is either a line, a triangle or a square. Use turtie graphics to draw the shape that the user requests of the size, color, line width and ine length that the user requests. For example, if these are the user choices for color, width, line length and shape, the blue tringle below would be correct graphical output what color? blue what line wath? 25 what line length? 100 line, triangle or square? triangle sectimple, HW5 HarryHoudini.pyand begins with a comment containing your name, dass and section, the posting date and number of the homework assignment. 1. Create a list named months of the months of the year. Write a for loop that iterates over the elements of months and prints out each one that begins with letter ' J, one month per line. 2. Write a for loop that iterates over all of the integers in the range 0 through 99 , indusive, and prints out all of those numbers that are divisible by both 2 and 5 . 3. Consider the strings created by these assignment statements: horton = "A person's a person, no matter how small." vowels = "aelouAEIOU" Write a for loop that prints out all the voweis in horton in the order they appear in horton

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!