hello, today we will make a simple age calc using python
first we will print a statement that includes "welcome to age calc"
second, we will make a variable called x and assign it to an input function "please enter your birth year :\n" an convert the type of input to integer
!NOTE!:\n for making a new line
After that we will define a function and call it calc by using :def calc(x=x,y=2020)
after that we will return y-x
and call the function in print statement
thanks for reading , peace.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (1)
Really nice!! Would be better if you used something like
and let the
y
to betime.year