Please note, this is a STATIC archive of website www.tutorialspoint.com from 11 May 2019, cach3.com does not collect or store any user information, there is no "phishing" involved.
Tutorialspoint

Speed Date Event

class S_D:
    def __init__(self, price, number): 
        self.price= price
        self.number= number
    
    def performance(self):
        if self.number >22:
            print ('Event was a hit!')
        elif 14<= self.number <= 22:
            print ('Event was good')
        else:
            print('Event was a bust :(')

###Creating first instance
Event1= S_D(15,13)
Event1.performance()

    

Advertisements
Loading...

We use cookies to provide and improve our services. By using our site, you consent to our Cookies Policy.