Tell us what’s happening:
i am trying to print name and instrument type for both instances, but the code is not working. anyone know what to look for?
Your code so far
# User Editable Region
class MusicalInstrument:
def __init__(self, name, instrument_type):
self.name = name
self.instrument_type = instrument_type
instrument_1 = MusicalInstrument('Oboe', 'woodwind')
instrument_2 = MusicalInstrument('Trumpet', 'brass')
print(instrument_1.name, instrument_1.instrument_type)
print(instrument_2.name, instrument_2.instrument_type)
# User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36
Challenge Information:
Build a Musical Instrument Inventory - Step 6