Codes to compute examples in class