Reference no: EM132175766
I've been recently learning Python 3.6, and doing some practice problems. I came across this one, that's meant to teach how to create a basic GUI, using Tkinter. Because I'm still very new to Python, I'm having some trouble figuring out exactly how to write the code, and always get tripped up with the indentation. I'd really appreciate some help with this, and if possible, explanation of each step.
You own several cabins in the mountains, and plan to make some extra 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 $300 per day. The rental price for premier cabin is $200 per day. And the rental price for economy cabin is $100 per day.
Write an application with GUI, using Tkinter. The application will have 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 the 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.
Once the user click "Calculate" button, the user will be able to see a message box containing the estimated amount of payment
For example, the user selected "Premier" cabin and drag the bar to set the length of stay to 35 days, calulates payment. A different user selected "Luxury" cabin and drag the bar to set the length of stay to 60 days, calcualtes payment...