IN PYTHON ( Use Fuctions and or with Loop if comfortable) Your friends just bought a new...

60.1K

Verified Solution

Question

Programming

IN PYTHON ( Use Fuctions and or with Loop ifcomfortable)

Your friends just bought a new five room house and need yourhelp to know how much it will cost to re-do the floors. Write aprogram that, given the dimensions of each of the five rooms andthe desired type of flooring, outputs the cost of each room as wellas the total cost. Hardwood costs $1.39/sqft, carpet costs$3.99/sqft, and tile costs $4.99/sqft. Input Validation: Yourprogram must work regardless of the case the floor option is typedin and any blank spaces surrounding it; If an invalid option isgiven, inform the user it was invalid and that you will be skippingthat room (treat the cost as zero). Round: Use the round functionto round your output to two decimal places.

Answer & Explanation Solved by verified expert
4.0 Ratings (481 Votes)
code output rawcode cost 0loop for five roomsfor i in range16printRoom stritaking    See Answer
Get Answers to Unlimited Questions

Join us to gain access to millions of questions and expert answers. Enjoy exclusive benefits tailored just for you!

Membership Benefits:
  • Unlimited Question Access with detailed Answers
  • Zin AI - 3 Million Words
  • 10 Dall-E 3 Images
  • 20 Plot Generations
  • Conversation with Dialogue Memory
  • No Ads, Ever!
  • Access to Our Best AI Platform: Flex AI - Your personal assistant for all your inquiries!
Become a Member

Other questions asked by students