Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Winter 2020 C! 18 points) Python. Write a Python function write file that accepts sequence of lines as input and writes lines into a file
Winter 2020 C! 18 points) Python. Write a Python function write file that accepts sequence of lines as input and writes lines into a file "data.txt" after making all characters in the sentence capitalized using unction. Then your program should print the longest line with the length on the standard output For example, suppose the following input is supplied to the program: Hello world Practice makes perfect The data written into data.txt is: HELLO WORLD PRACTICE MAKES PERFECT Then, the output should be: longest line = 22 characters PRACTICE MAKES PERFECT
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started