Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed
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

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

Students also viewed these Databases questions