+ 1

Please help me why is there syntax error.

class Car: def__init__(self,car_name): self.name=car_name class Sportscar(Car): def __init__(self,car_name,top_speed): super().__init__(car_name) self.speed=top_speed sportscar1=Sportscar('La ferrari',450) print(Sportscar.name) and when I execute it I got syntax error in 4th line class of 4th line produce this error but how and why please explain me.

6th Mar 2018, 5:31 PM
Maninder $ingh
Maninder $ingh - avatar
1 Resposta
+ 1
Provide a space between def and __init__ in line 2 ;)
6th Mar 2018, 6:08 PM
777
777 - avatar