human
I am working on the file "Classes+and+Objects.ipynb".
The first task is:
Create Class Using Key Value Arguments
Can you write Python program for it?
assistant
#Here is the Python program you requested.

class Student:
    def __init__(self, **kwargs):
        for k,v in kwargs.items():
            setattr(self,k,v,)
    
    def __str__(self):
        attrs = ["{}={}".format(k, v) for (k, v) in self.__dict__.items()]
        return str(attrs)
        #classname = self.__class__.__name__
        #return "{}: {}".format((classname, " ".join(attrs)))
            
s1 = Student(firstname="John",lastname="Doe")
print(s1.firstname)
print(s1.lastname)
print(s1)

def print_values(**kwargs):
    for key, value in kwargs.items():
        print("The value of {} is {}".format(key, value))

print_values(my_name="Sammy", your_name="Casey")