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.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter14: Files And Streams
Section: Chapter Questions
Problem 2E: Create a program named FileComparison that compares two files. First, use a text editor such as...
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
  • SEE MORE QUESTIONS
Recommended textbooks for you
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,