solutions

Simple Initialization

Create a simple class Cookie that is initialized by providing two arguments: scarf and buttons. The class should initialize the both arguments and also a third one hat that should be None. Example:

c1 = Cookie(scarf='green', buttons='blue')
print(c1.scarf)  # 'green'
print(c1.buttons)  # 'blue'
print(c1.hat)  # None

c2 = Cookie(scarf='yellow', buttons='red')
print(c2.scarf)  # 'yellow'
print(c2.buttons)  # 'red'
print(c2.hat)  # None

Test Cases

tests

[]