# Demonstration code for Scientific Computing class, # http://www.math.nyu.edu/faculty/goodman/teaching/SciComp2022/ # GraySlate.py # uses Python 3 and Numpy # Python Classes Demo # Define the GraySlate class with a constructor, some data, and a # member function class GraySlate: """A class with a constructor and a function""" def __init__( self, input): """Remember the input n""" self.n = input def add_n( myself, x): # the first argument doesn't have to be called "self", return x + myself.n # but it should be.