Question: Given the following class code that you should assume will correctly execute ( ignore any minor syntax errors ) : class Ticket ( object )

Given the following class code that you should assume will correctly execute (ignore any minor syntax errors):
class Ticket (object):
ticketCount =10
def_init_(self, name, event):
self.serialNumber = Ticket.ticketCount
Ticket.ticketCount +=1
self.cust_name = name
self.event = event
def_str_(self):
return ('Tick#'+ str(self.serialNumber)+'-'+ self.cust_name +'-'+ self.event)
def equalTick (self, t_obj):
if self ==t_obj:
return True, 'dupe ticket'
if not isinstance (t_obj, Ticket):
return False, 'Object not type Ticket'
return (str(self.serialNumber). serialNumber) and
str(self.event)== str(t_obj.event), 'comparison done' )
# global code
t1= Ticket ('K. Ball', 'GMU Basketball')
t2= Ticket ('Tom Brady', 'Pats Game')
t3= Ticket ('Gene Shuman', 'Nats Game')
t4= Ticket ('E. Musk', 'SpaceX Launch')
t5= Ticket ('K. Ball', 'GMU Basketball')
t6= Ticket ('A. Trebek', 'Jeopardy Audience')
t7= 'Tick#7- Gene Shuman - Nats Game'
What is the display output of
print (Ticket.ticketCount)?
 Given the following class code that you should assume will correctly

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!