D = {0:"Saturday",1:"Sunday",2:"Monday",3:"Tuesday",4:"Wednesday",5:"Thursday",6:"Friday"}
N = int(input("Enter today's day number : "))
W = int(input("Enter the number of days after today between 0-100 days : "))
if W>=0 and W<=100:
  if N<=6 and N>0:
    print("Today is",D[N],"and the day after" ,W ,"days is",D[N])
  elif N>6:
    print("invalid input! Number is not in the list")
else:
  print("Invalid input! Number should be between 0-100")
file1 = open("myfile.txt","a")
file1.write("Today \n")
file1.close()
Comments
Leave a comment