Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
<bound method TripCost.Mileageprice_per_gallon of <__main__.TripCost instance at 0x7f28fe0701b8>>
#!/usr/bin/python class TripCost: def __init__(self, miles_per_gallon, distance, price_per_gallon): self.miles_per_gallon = miles_per_gallon self.distance = distance self.price_per_gallon = price_per_gallon def Mileageprice_per_gallon(self): return (price_per_gallon * distance) trip1 = TripCost(22, 13.5, 3.27) print trip1.Mileageprice_per_gallon
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.