Well done!

You have completed Customizing Python with Magic Methods and Operator Overloading Quiz!

Quiz Question 1 of 5

How would you modify the __add__() method to ensure that adding two Account objects not only sums their amount attributes but also concatenates their name attributes with an underscore between them?

class Account:
   def __init__(self, name="", amount=0):
       self.name = name
       self.amount = amount

Choose the correct answer below:

Skip Quiz Review Instruction