0

I have syntax error on else? How?

class car:     def __init__(self, make, model, year, condition='New', kms=0):         self.make = make         self.model = model         self.year = year         self.condition = condition         self.kms = kms     def display(self, showAll=True):         if showAll:             print("This car is a %s %s from %s, it is %s and has %s kms." %(self.make, self.model, self.year, self.condition, self.kms)         else:             print("This car is a %s %s from %s." %(self.make, self.model, self.year)) whip = car('Ford', 'Fusion', 2012) whip.display(False)

8th Aug 2020, 5:01 PM
Kristian Purgar
Kristian Purgar - avatar
2 Answers
+ 1
In if, print not closed properly...
8th Aug 2020, 5:03 PM
Jayakrishna 🇮🇳
0
🤦‍♂️Wow thanks how didnt I see this
8th Aug 2020, 5:05 PM
Kristian Purgar
Kristian Purgar - avatar