Question: sample output given below 3. Computer World wants to calculate the amount required to purchase new laptop for their new staffs. Write a python program

sample output given below sample output given below 3. Computer World wants to calculate the amount

3. Computer World wants to calculate the amount required to purchase new laptop for their new staffs. Write a python program to solve the above problem using fruitful function with parameters and for loop concept. Inside function do the following: a. Create a function with parameter(expense as a parameter) b. Accept the number of required laptops c. Accept unit price for each laptop using for loop and calculate the total amount of laptops. d. Check the Total amount, if Total amount is less than expense, Display message Accepted" Otherwise display a message "Not Accepted". Also return the value of total amount Outside Function de the following: e. Accept expense from the user Pass this expense value to the function 8. Display the value returned by the function. Sample Output Enter the expense: 1800 Enter Number of labtops required: 3 Enter the price of a labtop: 288 Enter the price of a labtop: 400 Enter the price of a labtop: 100 Accepted The total amount is: 700.0

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!