Computer Science, asked by joji6756, 10 months ago

write a program in python to take 2 inputs for day, month and then calculate which day of the year, the given date is. for simplicity take 30 days a month.​in python

Answers

Answered by princenagar093
26

# taking input of day

d = int(input("enter day:" ))

# taking input of month

m = int(input("enter month:"))

# calculating the day of year as it will be number

# number of days of that month + all the days of

# previous months

n = d + (m-1)*30

# printing the output

print("day of year =", n)

Similar questions