import random
# creating a class for the Franchisee
class Franchisee:
# defining the constructor
def __init__(self, base_rent, tenant_improvement_allowance, free_rent):
self.base_rent = base_rent
self.tenant_improvement_allowance = tenant_improvement_allowance
self.free_rent = free_rent
# defining a function to negotiate terms
def negotiate(self):
# generating a random number
random_num = random.randint(1,10)
# if the random number is between 1 and 5, the Franchisee is successful in negotiating
# otherwise, the Franchisee is unsuccessful
if random_num <= 5:
self.base_rent *= 0.8
self.tenant_improvement_allowance *= 1.2
self.free_rent += 1
return True
else:
return False