python 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 .
python 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 .
Chapter7: Characters, Strings, And The Stringbuilder
Section: Chapter Questions
Problem 3GZ
Related questions
Question
python
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
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 2 steps
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage