Tutorial 1
Tutorial 1
Store your age, name, and desired annual income as literals in these variables.
The program should display these values on the screen in a manner similar to
the following:
My name is Joe Mahoney, my age is 26 and I hope to earn $100000.0 per year.
6. Write a program that will ask the user to enter the amount of a purchase. The
program should then compute the state and county sales tax. Assume the state
sales tax is 4 percent and the county sales tax is 2 percent. The program should
display the amount of the purchase, state sales tax, county sales tax, total sales
tax, and total of the sale (which is the sum of the amount of purchase plus the
total sales tax).
7. A bag of cookies holds 40 cookies. The calorie information on the bag claims
that there are 10 servings in the bag and that a serving equals 300 calories.
Write a program that lets the user enter the number of cookies he or she
actually ate and then reports the number of total calories consumed.
8. Write a program that asks the user to enter three test scores. The program
should display each test score, as well as the average of the scores.