Written in python. This file is about rectangles. It requires a main function and three custom functions, all of which take the rectangle dimensions as arguments. a function that returns the area of a rectangle. a void function that prints the perimeter of a rectangle. a function that returns the length of a rectangle's diagonal. This function must use a method of the math module.  The main function should prompt the user for the rectangle dimensions (as floats) and execute the custom functions. All calculations should be printed accurate to three decimal places using f-strings.

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter7: Using Methods
Section: Chapter Questions
Problem 2CP
icon
Related questions
Question

Written in python. This file is about rectangles. It requires a main function and three custom functions, all of which take the rectangle dimensions as arguments.

  • a function that returns the area of a rectangle.
  • void function that prints the perimeter of a rectangle.
  • a function that returns the length of a rectangle's diagonal. This function must use a method of the math module

The main function should prompt the user for the rectangle dimensions (as floats) and execute the custom functions. All calculations should be printed accurate to three decimal places using f-strings.

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
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,
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning