jmbejara / comp-econ-sp18

Main Course Repository for Computational Methods in Economics (Econ 21410, Spring 2018)
16 stars 23 forks source link

HW0 Q3 #34

Closed rrabines closed 6 years ago

rrabines commented 6 years ago
def f():
    pass
print(type(f()))

This prints <class 'NoneType'> rather than the marked option A.

Isn't this the case because the function f contains the pass function, which is a null operation and as the function is defined only with the null operation, it is categorized as a NoneType, an object with no value?

jmbejara commented 6 years ago

You're right. My apologies. Thanks for catching this. I will update the solutions now.

jmbejara commented 6 years ago

I've now corrected questions 3, 13, and 17 here: https://github.com/econ-21410-sp18/comp-econ-hw-jbejarano1/blob/master/hw-submit-00/python-basics-solutions.pdf