Yes.
Of course, by homework assignment, I meant a homework assignment that would involve programming a computer to perform a basically routine process. Doing it by hand would be very, very silly.
Americans (which I assume you are) have the strangest attitude toward computers and coding. Almost like anything done that way suddenly becomes magical or deific, and not “merely ivory tower mathematics.” It’s utterly pathological. (I am American, btw.)