Python
Python copied to clipboard
#Python
class showroom: print( "car dealer:Heartly welcome to our showroom.please take your seat \n what can i help you" ) print("customer: i want buy BMW car show me") print("car dealer:see this one futures are")
def __init__(self, brand, price, speed):
self.brand = brand
self.price = price
self.speed = speed
def car_info(self):
print(
f"car runs {self.speed}km/h it's brand is {self.brand} and it's price is only {self.price}"
)
c = showroom("BMW", "25lakh", 158) c.car_info()
print("thank you for visit")
Python Learning Progress Successfully implemented a class in Python, exploring OOP concepts like data encapsulation and methods. Small steps toward becoming a better programmer. 💪
#PythonDeveloper #OOP #TechLearning #StudentLife @mr_ayya_28
👨💻🚀