The text document feelings.txt contains lines that alternate between a date and a mood. For example, the first few lines are:   17/12/1999 grumpy 19/01/2000 happy 23/04/2003 sleepy It continues in this fashion. Reformat this text so that the data from the first two lines is condensed into a single line that reads:   On 17/12/1999, I was feeling grumpy. Continue this formatting for all other lines of data in feelings.txt , and save this new text to a document called logbook.txt .

Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter11: More Object-oriented Programming Concepts
Section: Chapter Questions
Problem 2FTB
icon
Related questions
Question

The text document feelings.txt contains lines that alternate between a date and a mood. For example, the first few lines are:

 

17/12/1999

grumpy

19/01/2000

happy

23/04/2003

sleepy

It continues in this fashion. Reformat this text so that the data from the first two lines is condensed into a single line that reads:

 

On 17/12/1999, I was feeling grumpy.

Continue this formatting for all other lines of data in feelings.txt , and save this new text to a document called logbook.txt .

Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Form and its Elements
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT