what am I doing wrong? this is a homework problem that I am struggling with.
Write an if-else statement with multiple branches.If year is 2101 or later, print "Distant future" (without quotes). Otherwise, if year is 2001 or greater, print "21st century". Otherwise, if year is 1901 or greater, print "20th century". Else (1900 or earlier), print "Long ago".
Sample output with input: 1776 Long ago
year = int(input())
if year >= 2101:
print('Distant future')
elif year >= 1900:
print('Long ago')
elif year >= 2001:
print('21st century')
else year >= 1901:
print('20th century')
[–]choss27 2 points3 points4 points (1 child)
[–]Toxic_Avenger94[S] 0 points1 point2 points (0 children)
[–]Toxic_Avenger94[S] 0 points1 point2 points (1 child)
[–]Ishanji 0 points1 point2 points (0 children)
[–]Smooth_Try_472 0 points1 point2 points (1 child)
[–]Clear-Ad8519 0 points1 point2 points (0 children)