The type hint

Report a typo

Write a function that takes two variables birth_year and current_year as input and returns the absolute difference between them. Annotate both variables and return statement with the type int. Print out your annotations by calling the right function attribute!

You do not need to handle input or call the function, just implement it.

Sample Input 1:


Sample Output 1:

{'birth_year': <class 'int'>, 'current_year': <class 'int'>, 'return': <class 'int'>}
Write a program in Python 3
# write your code here
___

Create a free account to access the full topic