Could you please provide me with some specific recommendations on ways to enhance the quality of this code.
#birth year verification
import datetime
from enum import Enum
time_now = datetime.datetime.now()
#assigning a current date to the variable time_now
Birth_year = int(input("Enter your Birth Year"))
def Birth_year_ver(Birth_year):
if Birth_year < 1900 or Birth_year > time_now.year:
#validating that a given year is not greater than the current datetime.year
print("False")
else:
print("true")
Birth_year_ver(Birth_year)
New contributor
b1nary_b0y is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.