The Python new code is as follows:
year = Int (input (' Please enter years: '))
momth = Int (input (' Please enter month: '))
day = Int (input (' Please enter Number '))
if (year% 4 = = 0 and year%! = 0) or (year% 400 ==0):
if momth = = 1:
Print (day)
Elif momth ==2:
Print (+ day)
Elif momth ==3:
Print (+ + day)
Elif momth ==4:
Print (+ + + day)
Elif momth ==5:
Print (+ + + + + day)
Elif momth ==6:
Print (+ + + + + + day)
Elif momth ==7:
Print (+ + + + + + + +)
Elif momth ==8:
Print (+ + + + + + + + + +)
Elif momth ==9:
Print (+ + + + + + + + + +)
Elif momth ==10:
Print (+ + + + + + + + + + + + +)
Elif momth ==11:
Print (+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)
Else
Print (+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)
Else
if momth = = 1:
Print (day)
Elif momth ==2:
Print (+ day)
Elif momth ==3:
Print (+ + day)
Elif momth ==4:
Print (+ + + day)
Elif momth ==5:
Print (+ + + + day)
Elif momth ==6:
Print (+ + + + + + +)
Elif momth ==7:
Print (+ + + + + + + +)
Elif momth ==8:
Print (+ + + + + + + + +)
Elif momth ==9:
Print (+ + + + + + + + +)
Elif momth ==10:
Print (+ + + + + + + + + +)
Elif momth ==11:
Print (+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +)
Else
Print (+ + + + + + + + + + + + +)
Python calculates the day ordinal of a year based on the date of the month