Log in to ranger using your class account (refer to previous labs if you have questions about how to log in.) Create a source file called cla6.py using the file editor in idle3 (refer to CLA3- Introduction to IDLE for how use IDLE from ranger) Follow these instructions: at a ranger prompt type: idle3 & . To write a new Python program in IDLE, open a new script window: Click File on the menu bar, then click New Window (alternately you can press Ctrl+N). .Write a python program that meets the given problem specification. . Problem Specification . The program should calculate the area of two rectangles, display the areas as output, and also tell the user which rectangle has greater area. . To do this: read input from the user; length and width of rectangle1. (NOTE: Use variable names -length1 and width1; these should be floating point values; use input prompts as shown in sample output below.) . read input from user; length and width of rectangle2.(NOTE: Use variable names - length2 and width2; these should be floating point values; use input prompts as shown in sample output below.) . calculate area1 = length 1 times width 1 . calculate area2 = length 2 times width2 .Display area1 and area2 (NOTE: area should be displayed to two decimal places; use print statements as shown in sample output below.) .if area1 is greater than area 2 the program should display "Area of rectangle1 is greater than area of rectangle2." (NOTE: quotes are excluded from the output; your output will not be bold.) . otherwise the program should display "Area of rectangle1 could either be less than or equal to area of rectangle2." (NOTE: quotes are excluded from the output; your output will not be bold.) . Refer to the sample output below to craft your program output: Sample Output1 Enter length of rectangle1: 10 Enter width of rectangle 1: 20 Enter length of rectangle2: 5 Enter width of rectangle2: 5 Area of rectangle1 is 200.00 Area of rectangle2 is 25.00 Area of rectangle1 is greater than area of rectangle2. Sample Output 2 Enter length of rectangle 1:2 Enter width of rectangle1: 6 Enter length of rectangle2: 2 Enter width of rectangle2: 10 Area of rectangle1 is 12.00 Area of rectangle2 is 20.00 Area of rectangle1 could either be less than or equal to area of rectangle2.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

 

HEMIP INTEGER THROUGH CODEV. 

 

Log in to ranger using your class account (refer to previous labs if you
have questions about how to log in.)
Create a source file called cla6.py using the file editor in idle3 (refer to
CLA3- Introduction to IDLE for how use IDLE from ranger)
₁ Follow these instructions:
at a ranger prompt type: idle3 &
.To write a new Python program in IDLE, open a new script window:
Click File on the menu bar, then click New Window (alternately you
can press Ctrl+N).
.Write a python program that meets the given problem
specification.
. Problem Specification
. The program should calculate the area of two rectangles, display
the areas as output, and also tell the user which rectangle has
greater area.
. To do this:
. read input from the user; length and width of rectangle1.
(NOTE: Use variable names-length1 and width1; these
should be floating point values; use input prompts as
shown in sample output below.)
. read input from user; length and width of rectangle2. (NOTE:
Use variable names -length2 and width2; these should
be floating point values; use input prompts as shown in
sample output below.)
. calculate area1 = length 1 times width 1
. calculate area2 = length 2 times width2
.Display area1 and area2 (NOTE: area should be displayed
to two decimal places; use print statements as shown in
sample output below.)
.if area1 is greater than area 2 the program should display
"Area of rectangle1 is greater than area of rectangle2."
(NOTE: quotes are excluded from the output; your output
will not be bold.)
. otherwise the program should display "Area of rectangle1
could either be less than or equal to area of rectangle2."
(NOTE: quotes are excluded from the output; your output
will not be bold.)
. Refer to the sample output below to craft your program
output:
Sample Output1
Enter length of rectangle 1: 10
Enter width of rectangle 1: 20
Enter length of rectangle2: 5
Enter width of rectangle2: 5
Area of rectangle1 is 200.00
Area of rectangle2 is 25.00
Area of rectanglet is greater than area of rectangle2.
Sample Output 2
Enter length of rectangle 1: 2
Enter width of rectangle 1:6
Enter length of rectangle2: 2
Enter width of rectangle2: 10
Area of rectangle1 is 12.00
Area of rectangle2 is 20.00
Area of rectangle1 could either be less than or equal to area of rectangle2.
Transcribed Image Text:Log in to ranger using your class account (refer to previous labs if you have questions about how to log in.) Create a source file called cla6.py using the file editor in idle3 (refer to CLA3- Introduction to IDLE for how use IDLE from ranger) ₁ Follow these instructions: at a ranger prompt type: idle3 & .To write a new Python program in IDLE, open a new script window: Click File on the menu bar, then click New Window (alternately you can press Ctrl+N). .Write a python program that meets the given problem specification. . Problem Specification . The program should calculate the area of two rectangles, display the areas as output, and also tell the user which rectangle has greater area. . To do this: . read input from the user; length and width of rectangle1. (NOTE: Use variable names-length1 and width1; these should be floating point values; use input prompts as shown in sample output below.) . read input from user; length and width of rectangle2. (NOTE: Use variable names -length2 and width2; these should be floating point values; use input prompts as shown in sample output below.) . calculate area1 = length 1 times width 1 . calculate area2 = length 2 times width2 .Display area1 and area2 (NOTE: area should be displayed to two decimal places; use print statements as shown in sample output below.) .if area1 is greater than area 2 the program should display "Area of rectangle1 is greater than area of rectangle2." (NOTE: quotes are excluded from the output; your output will not be bold.) . otherwise the program should display "Area of rectangle1 could either be less than or equal to area of rectangle2." (NOTE: quotes are excluded from the output; your output will not be bold.) . Refer to the sample output below to craft your program output: Sample Output1 Enter length of rectangle 1: 10 Enter width of rectangle 1: 20 Enter length of rectangle2: 5 Enter width of rectangle2: 5 Area of rectangle1 is 200.00 Area of rectangle2 is 25.00 Area of rectanglet is greater than area of rectangle2. Sample Output 2 Enter length of rectangle 1: 2 Enter width of rectangle 1:6 Enter length of rectangle2: 2 Enter width of rectangle2: 10 Area of rectangle1 is 12.00 Area of rectangle2 is 20.00 Area of rectangle1 could either be less than or equal to area of rectangle2.
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Files and Directory
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education