I am learning programming for the first time in my life and I need help with Python


#1

Hi there: I am a complete newbee in programming in general, but I literally need to learn in order to progress. I started learning with Python as I was told that it was the easiest way to start and start learning about the code syntax and what not. So, anyways, I am doing the next code: https://gist.github.com/d41a437548d1e3407a8374861b55ed44

from the exercises in the https://www.codecademy.com/paths/computer-science/tracks/cspath-intro/modules/cspath-python-functions/lessons/intro-to-functions/exercises/returns

But even though I got the “correct answer” as per code academy’s automatic corrections. I am still in doubt… Is my code correct for what I am being asked to do in each part of this exercise? Below I am including the things I am being asked to do.

Part 1 The function calculate_age in script.py creates a variable called age that is the difference between the current year, and a birth year, both of which are inputs of the function. Add a line to return age .

Part 2 Outside of the function, call calculate_age with values 2018 ( current_year ) and 1993 ( birth_year ) and save the value to a variable called my_age .

Part 3.
Call calculate_age with values 2018 ( current_year ) and 1953 ( birth_year ) and save the value to a variable called dads_age .

Print the string "I am X years old and my dad is Y years old" to the console, with my_age where the X is and dads_age where the Y is.