Computer Science, asked by jdks899ksk, 6 months ago

Write python programming inputs for following ​

Attachments:

Answers

Answered by Anonymous
2

The following inputs /source code is required for the outputs

class CementDealer:

def getCementCost(self, quantity):

return quantity * 300

class IronDealer:

def getlronCost(self, quantity):

return quantity * 4500

class Builder(CementDealer, IronDealer):

def getTotalCost(self, cQ, iQ):

c_cost = self.getCementCost(cQ)

i_cost = self.getlronCost(iQ)

totalCost = c_cost +i_cost

return totalCost

cement = int(input("Enter Cement Quantity : "))

iron = int(input("Enter Iron Quantity : "))

b = Builder()

total_cost = b.getTotalCost(cement, iron)

print("TOTAL COST :", total_cost)

More information

Python is an interpreted, high-level and general-purpose programming language. Python's design philosophy emphasizes code readability with its notable use of significant whitespace. Its language constructs and object-oriented approach aim to help programmers write clear, logical code for small and large-scale projectsPython interpreters are available for many operating systems. A global community of programmers develops and maintains CPython, a free and open-source reference implementation. A non-profit organization, the Python Software Foundation, manages and directs resources for Python and CPython development. It currently ties with Java as the second most popular programming language in the world.

Similar questions