So I am working on one of the freecodecamp.org python assignments and one of the criteria is that I need to create a class. Quoting the assignment:
The class should take a variable number of arguments that specify the number of balls of each color that are in the hat. For example, a class object could be created in any of these ways:
hat1 = Hat(yellow=3, blue=2, green=6)
hat2 = Hat(red=5, orange=4)
hat3 = Hat(red=5, orange=4, black=1, blue=0, pink=2, striped=9)
I have no idea how to construct a class that allows for objects to have a variable number of arguments with values. The class section on the website was very minimal and did not even cover variable arguments for keyword and values when constructing a class object. Would greatly appreciate any help.