Gadgets 4 Students Online Courses
Free Tutorials  Go to Your University  Placement Preparation 
0 like 0 dislike
5.6k views
in Python Programming by Goeduhub's Expert (9.0k points)
Expected Output:

Input a year: 2019                                                      

Input a month [1-12]: 08                                                

Input a day [1-31]: 23                                                  

The next date is [yyyy-mm-dd] 2019-8-24

Where can I do online courses From Word's Top Instructors?

UDEMY::  Attend All Udemy Courses in Just INR 450[Coupon]
Coursera:: Join For FREE

1 Answer

0 like 0 dislike
by Goeduhub's Expert (9.0k points)
 
Best answer
d=int(input("ENTER THE DAY : "))

m=int(input("ENTER THE MONTH : "))

y=int(input("ENTER THE YEAR : "))

 

if ((y % 4 == 0) and (y % 100!= 0)) or (y%400 == 0):

    if m==2:

        d1=29

    elif m==1 or m==3 or m==5 or m==7 or m==8 or m==10 or m==12:

        d1=31

    else :

        d1=30

else:

    if m==2:

        d1=28

    elif m==1 or m==3 or m==5 or m==7 or m==8 or m==10 or m==12:

        d1=31

    else :

        d1=30

if d==31 and m==12 :

    d=1

    m=1

    y=y+1   

elif d1-d==0 :

    m=m+1

    d=1

else:

    d=d+1

    

print("NEXT DAY IS : ",d,"/",m,"/",y)
Code your future with Programming skills. Courses starting at ₹ 455 only!

3.3k questions

7.1k answers

395 comments

4.5k users

 Important Lists:

Important Lists, Exams & Cutoffs Exams after Graduation PSUs

 Goeduhub:

About Us | Contact Us || Terms & Conditions | Privacy Policy || Youtube Channel || Telegram Channel © goeduhub.com Social::   |  | 

 

Free Online Directory
...