Create a list called scores with 79,84,92,75,84,100, 83, 91, 88,84, 69, 98,84, 91,84
Write a python program that asks the user for a positive integer input and stores it as number. If the input number is a negative number or zero, print an error message. If the input is positive, then your program should calculate the number of times the input number appears in the list scores.
Print the result with an appropriate message.
Test your program with positive and negative inputs as well as zero. Submit your program result for input 84.
In 2019, a small company's revenue was $2,750,400, and its EPS (Earnings per Share) was $0.68. The company is planning for annual revenue growth of 9.5%. Its EPS, on the other hand, are expected to grow at 12.0% annually. Calculate and print the companys expected (planned) revenue and earnings per share for 2019 and the next seven years. Show the results as a table with 3 columns, with headings for each column. (See the example output below). Do not show any decimals in the revenue column. The EPS should be displayed with two decimal places.
year revenue EPS
2019 2750400 0.68
This program requires the use of a sentinel because you do not know how many inputs you need to process before-hand. You need to detect that condition at run time. You detect the end of input through the sentinel. (In this program, the sentinel is 9999). The sentinel value should be chosen such that the sentinel value is NOT expected to be a possible value in the input stream. Ask for an input integer from the user, repeatedly. Read the user input and store
12, -7, 0, -12, 27, 19, 10, -15, 29, 9999
This question is an extension of Q3 in programming project 1. In project 1 Q3, you calculated the total amount due for one item of clothing. In this question, you need to extend the program you wrote before to calculate the total amount due for all the shopping items together. Make use of earlier work.
In Morristown, clothing that costs $15.00 or less has a lower sales tax rate of 1.7%. Otherwise, the sales tax is 7.65% of the purchase price. Mrs. Warren went shopping and bought several items of clothing, whose prices are: 76.50, 14.75, 39.00, 22.50, 12.95, 8.99, 29.95
Write a python program in which you calculate the total due amount from Mrs. Warren and print your answer with an appropriate message.
This question is an extension of Q4 from programming project-1, where you calculated the income tax due on a given taxable income. Modify that program so that it can calculate income tax for any number of incomes. Submit your results for the following taxable incomes:
27500.00, 75650.00, 317500.00, 137325.00, 268600.00, 84625.00, 37655.00
For each income, calculate the income tax due and display the taxable income and the income tax with an appropriate message. Your program should print one line for each taxable income.
Hint 1: make use of your work/code from programming project 1 ; Hint 2: There is no need to get taxable incomes as keyboard input. Define a list and initialize the list with the taxable incomes.
2020 Federal Income Tax Schedule (married, joint return) | |||
Taxable Income | Tax Rate | Tax at Lower limit | Tax at Upper limit |
0 <= income <= 19750 | 0.10 | 0.00 | 1975.00 |
19750 < income <= 80250 | 0.12 | 1975.00 | 9235.00 |
80250 < income <= 171050 | 0.22 | 9235.00 | 29211.00 |
171050 < income <= 326600 | 0.24 | 29211.00 | 66543.00 |
326600 < income <= 414700 | 0.32 | 66543.00 | 94735.00 |
414700 < income <= 622050 | 0.35 | 94735.00 | 167307.50 |
622050 < income | 0.37 | 167307.50 |