Hi, First of all let's look at
Now the error - the error comes because at the time of the function call name
GetMonths
function. You don't need to supply Months
as argument. You just need Years
and then return calculated Months
.Now the error - the error comes because at the time of the function call name
Months
does not exists.def get_months(years): months = years * 12 return monthsmost people would simply:
def get_months(years): return years * 12and call it (e.g. print the result) like this:
print(get_months(25))as a general note - take a look at PEP-8 - the styling guide, naming conventions, etc.