Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

beginner programmer so plz have a simple code so I can understand thanks Submit a text file with the extension '.py' with your answers to

image text in transcribed

beginner programmer so plz have a simple code so I can understand thanks

Submit a text file with the extension '.py' with your answers to the assigned exercises. 1. Write Python code that does 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 Repeat the previous problem with the additional requirement that 'NOT OK' is printed if the condition is false 2. 3. Write a program that asks the user for a color, a line width, a line leogth and a shape. Assume that the user will specify a shape that is either a line, a triangle, or a square. Use turtle graphics to draw the shape that the user requests of the size, color, line width and line length that the user requests. For example, if these are the user choices for color, width, line length and shape, the blue triangle below would be correct graphical output what color? blue what line width? 25 what line length? 100 line, triangle or square? triangle 2 words Type here to search

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago