Exception handling to a tip calculator program

Assignment Help Business Management
Reference no: EM131935830

Add exception handling to a Tip Calculator program. 

Console

Tip Calculator

INPUT

Cost of meal: ten

Must be a valid decimal number. Please try again.

Cost of meal: -10

Must be greater than 0. Please try again.

Cost of meal: 52.31

Tip percent: 17.5

Must be a valid integer. Please try again.

Tip percent: 20

OUTPUT

Cost of meal: 52.31

Tip percent: 20%

Tip amount: 10.46

Total amount: 62.77

Specifications

  • The program should accept decimal entries like 52.31 and 15.5 for the cost of the meal.
  • The program should accept integer entries like 15, 20, 25 for the tip percent.
  • The program should validate both user entries. That way, the user can't crash the program by entering invalid data.
  • The program should only accept numbers that are greater than 0.
  • The program should round results to a maximum of two decimal places.

This program need to run with python

Reference no: EM131935830

Questions Cloud

Discuss about the rate of return on your firm stock : Assume that the average firm in your company's industry is expected to grow at a constant rate of 4% and that its dividend yield is 7%.
List and describe the food item : List and describe the food item, and include where it came from. Can you live without the food item you chose? Is there a local substitute available?
Important in the electronic communications : How is bandwidth defined, and why it is so important in the electronic communications?
Symptoms and medical histories into a computer : DQ 1. What pros and cons could result from patients entering their own symptoms and medical histories into a computer?
Exception handling to a tip calculator program : The program should accept decimal entries like 52.31 and 15.5 for the cost of the meal. The program should accept integer entries like 15, 20, 25 for the tip
Calculate the accured interest of the bonds : Assume that you bought Treasury bonds. The settlement date of the bond is 9/30/2017, and the bond pays coupon interests on 8/15 and 2/15 each year.
Determine how much money would you lose : Assume that a bank's bid rate on Japanese yen is $.0052 and its ask rate is $.0056. Using the bid/ask rate compute the bid/ask spread percentage.
Identify the routine business functions : Identify the routine business functions and the management activities supported by your DSS.
Collaboration between virtual team members : Discuss additional rules that could be added to facilitate collaboration between virtual team members. Discuss resistance that might be encountered

Reviews

Write a Review

Business Management Questions & Answers

  Network administration involves planning

Network administration involves planning, installation, configuration, management, and documentation. Based on the knowledge you have achieved thus far

  Preparing the cash flow statement

While preparing the ‘Cash Flow Statement' the accountant of Gulfam Ltd., a financing company showed ‘Dividend received on Investments' on ‘Investing Activity'. Was he correct in doing so? Give reasons.

  Leadership and academic standards1 how many hours outside

leadership and academic standards1. how many hours outside of class on average do you think students should use to

  Based on the history of business ethics reviewed

Based on the history of business ethics reviewed in this chapter, do you think the business world is becoming more or less ethical? Explain your answer.

  Provide one example of business management applying

Provide one example of business management applying each framework to support your response.

  Leadership important to early careerists

Why is the study of leadership important to early careerists in the health industry? What are the challenges in the industry that require quality leadership?

  Would you recommend that your parents

Would you recommend that your parents (as examples) get a certificate that they could use to send e-mail?

  Values-attitudes contribute to employee overall

To what extent do you think that values and attitudes contribute to an employee's overall satisfaction with their job? Why or why not? Referring to both examples from the business and political worlds

  How would you improve chart select from a design perspective

How would you improve the chart selected from a design perspective? Explain at least three external factors that could influence the trend.

  Impact on business after that time period

Do you think that technology has an impact on business after that time period? Why or why not?

  Determine the average inflation rate

Determine the average inflation rate (to nearest 0.01%) over the years.

  Greatest assets as an employee

The question has more than one answer Select the questions below that would lead to a well-focused Interview. Where do you see yourself in this company five years from now? Why did you leave your last job? What are your greatest assets as an employee..

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd