Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part A Calculate the rectangles area and perimeter. In this section of the lab, you will be creating a python program to calculate the rectangles

Part A

Calculate the rectangles area and perimeter.

In this section of the lab, you will be creating a python program to calculate the rectangles area and perimeter based on the input width and height.

You will be using the Python IDLE (a text editor and programming environment that comes with python). Name your file lab02_XX.py where you replace the XX with your initials.

Your program must include:

A comment on the top line of your program containing your name.

A comment on the second line containing your section number.

A comment on the third line containing the date.

A comment on the fourth line containing your email address.

A comment with the lab number and purpose of this lab.

Prompt the user to enter a number and assign this number to the variable width.

Prompt the user to enter another number and assign this number to the variable height.

Everything user input is a string. You must convert the input string to int or float.

Print the width and height.

Declare a variable to store the calculated area.

Declare another variable to store the calculated perimeter.

You need to get a similar result with the following example when running your code.

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

Database Development For Dummies

Authors: Allen G. Taylor

1st Edition

978-0764507526

More Books

Students also viewed these Databases questions

Question

Does log 81 (2401) = log 3 (7)? Verify the claim algebraically.

Answered: 1 week ago

Question

6. Explain how to train managers to coach employees.

Answered: 1 week ago

Question

5. Tell how job experiences can be used for skill development.

Answered: 1 week ago

Question

4. Explain the characteristics of successful mentoring programs.

Answered: 1 week ago