Input and Output Business#
Business Applications#
Question-1: Production Data Analysis#
Write a program that prompts the user for 5 numbers using five input() functions, each representing the annual production for the last five years.
Calculate the total, average, and highest production using built-in functions.
Question-2: Revenue#
Revenue (R) is the product of the number (n) of items sold and the price (p) of the item.
\(R = p\cdot n\)
Write a program that ask the user for the price of an item and calculate the revenue using the following formula for the number of item sold.
\( n = -1.5p+30 \)
Question-3: Simple Interest#
Simple Interest Formulas: \(\displaystyle I=P r t\) and \(A = P + I\) where
A is the final amount
I is the interest amount
P is the initial (principal) amount
r is the annual interest rate (decimal form)
t is the number of years
Write a program that asks the user for the principal, annual interest rate, and number of years using three input() functions one by one, and then returns the interest and final amount.
Sample Output:
Please enter the principal: 1500
Please enter the annual interest rate: 0.025
Please enter the year: 20
I = 750.0
A = 2250.0