#programming language is python. I own several cabins somewhere in the Rocky Mou
ID: 3836274 • Letter: #
Question
#programming language is python.
I own several cabins somewhere in the Rocky Mountain. I plan to make some money by renting them to tourists and visitors. There are three different types of cabins: luxury, premier and economy. The rental price for luxury cabin is $200 per day. The rental price for premier cabin is $150 per day. The rental price for economy cabin is $100 per day.
I hire you to write an application with GUI for me. It has three components: a slider (Scale) for the tourist to choose how many days they want to stay in the cabin (between 0 and 100 days), A drop-down menu (OptionMenu) for the tourist to choose which type of cabin they want to rent (luxury, premier or economy), and a “Calculate” button. For drop-down menu, the “Economy” option should be selected by default. Once the tourist clicks the button, the program should launch an information message box to show the user what is the estimated amount of payment for her/him.
The picture below shows the interface of this application at the start stage (Economy is selected by default):
For example, the user selected “Premier” cabin and drag the bar to set the length of stay to 34 days.
Once the user click “Calculate” button, the user will be able to see a messagebox containing the estimated amount of payment (I took the screenshot in Mac, the messagebox will look different inWindows environment)
A different user selected “Luxury” cabin and drag the bar to set the length of stay to 62 days.
Once this user clicks on the “Calculate” button, this is what she/her would see:
Days: Cabin Type: Economy CaculateExplanation / Answer
Source code for the given problem statement:
Hope this helps! Please revert in case of doubts/more clarifications needed.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.