Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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 image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

6. Identify seven types of hidden histories.

Answered: 1 week ago

Question

What is the relationship between humans and nature?

Answered: 1 week ago