207k views
4 votes
what should we modify the palindromes program(section 8.2) so that uppercase and lowercase versions of letters are considered different?

1 Answer

4 votes

Answer: self

Step-by-step explanation:

​ class raft:

def __init__(self,capacity):

self.capacity = capacity

self.location = 'Gauley'

self.repairs = []

def __str__(self):

result = "Capacity: " + str(self.capacity)

result = result + "\\Location:" + self.location

result = result + "\\Repairs:"

if len(self.repairs) < 1:

result = result +"No repairs were needed."

else:

for item in self.repairs:

result = result + '\\'

for member in item:

result = result + str(member) + " "

return result

def addRepair(self, newRepair):

self.repairs.append(newRepair)

User Skyebend
by
4.8k points