online compiler and debugger for c/c++

code. compile. run. debug. share.
Source Code    Language
class Car: def __init__(self, make, model, year): self.make = make self.model = model self.year = year def __str__(self): return f'This car is {self.make.title()} {self.model.title()} from {self.year}' class ElectricCar(Car): def __init__(self, make, model, year, battery_capacity): super().__init__(make, model, year) self.bat_capacity = battery_capacity # убрал __ @property def bat_capacity(self): return self.__bat_capacity @bat_capacity.setter def bat_capacity(self, value): if isinstance(value, (int,float)) and value > 10: self.__bat_capacity = value else: print('Not correct value') self.__bat_capacity = 10 def __str__(self): return Car.__str__(self) + ' with battery ' + str(self.__bat_capacity) el_car = ElectricCar('tesla', 'model 3', 2020, 4) print(el_car)

Compiling Program...

Command line arguments:
Standard Input: Interactive Console Text
×

                

                

Program is not being debugged. Click "Debug" button to start program in debug mode.

#FunctionFile:Line
VariableValue
RegisterValue
ExpressionValue