Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 32 20 pts In Spyder, write a Python program that will solve the following problem. Name the program carpet.py. A gym owner wants to

image text in transcribed
Question 32 20 pts In Spyder, write a Python program that will solve the following problem. Name the program carpet.py. A gym owner wants to cover the gym floor with carpet squares. Each carpet square is 2 feet x 2 feet. The floor is rectangular and the owner needs to know how many carpet squares to buy. The program must perform these tasks: 1. Import the math module 2. input (with a prompt) the length of the room (the number may have a decimal point) 3. input (with a prompt) the width of the room (the number may have a decimal point) 4. calculate the number of squares needed to cover the floor and store in a variable. The number must be an integer because you cannot buy a piece of a square. You have to buy a whole square. o It may help to make a sketch. The math method math.ceilis needed in the calculation 5.print (with meaningful text) the number of carpet squares needed You do not have to write comments. Upload your Python program (hle ending with .py)

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

Securing SQL Server Protecting Your Database From Attackers

Authors: Denny Cherry

3rd Edition

0128012757, 978-0128012758

More Books

Students also viewed these Databases questions