Computer Science, asked by amantasha7, 11 months ago

8. Write a program that reads a date as an integer in the format MMDDYYYY. The program will call afunction that prints print out the date in the format Month Name> <days, syear,Sample run:Enter date : 12252019December 25, 2019​

Answers

Answered by chatrapathi09
0

Answer:

first read the date by using array concept

Attachments:
Answered by prakharagrawal6055
0

Answer:

date=int(input("Enter the date bin MMDDYYYY format:"))

yr=["January", "February","March", "April", "May" , "June" , "July" , "August ", "September ", "October ", "November" , 'December ']

month=date//1000000

day=(date%1000000)//10000

year=date%10000

print(yr[month-1],day,",",year)

#or

month=int(str(date)[:2])

day=int(str(date)[2:4])

year=int(str(date)[4:])

print(month,day,",",year)

Explanation:

Similar questions