Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In eclipse project Task 04: Write and test a program t04.py : that asks the user to enter an integer that represents the date in

In eclipse project

Task 04: Write and test a program t04.py :

that asks the user to enter an integer that represents the date in the YYYYMMDD format and then displays the date in the format DD/MM/YYYY. You may assume that the user will always enter a valid date. You must use integer division and modulus, and NOT strings, to extract the date parts.

Sample run of the program

Enter a date in the format YYYYMMDD: 20170527

27/05/2017

**** Question was previously answered, but my output for the second line appears as 27/5/2017, I need it to appear has 27/05/2017, how do I put a 0 in front of the 5. I've included a picture of my work.image text in transcribed

8 _updated__ = "2020-01-20" 10 11 date = int(input('Enter a date in the format YYYYMMDD: ')) 12 day = date%100 13 date = int(date/100) 14 month=date%100 15 year=int(date/100) 16 print() 17 print(str(day)+'/' +str(month)+'/' +str(year)) hon3 19 ANAS hon3 G E P 9 Console X X

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Management Systems

Authors: Mark L. Gillenson

3rd Edition

978-1119907466

More Books

Students also viewed these Databases questions

Question

1. Ask students to put their names on the backs of their papers.

Answered: 1 week ago

Question

Which are non projected Teaching aids in advance learning system?

Answered: 1 week ago