Trusted Edit View Insert Cell Kernel Widgets Help Run Code Slide Type Fragme • Exercise # 1 Write a program that reads a file containing text. Read each line and send it to the output file, preceded...

Python
Trusted<br>Edit<br>View<br>Insert<br>Cell<br>Kernel<br>Widgets<br>Help<br>Run<br>Code<br>Slide Type Fragme<br>• Exercise # 1 Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers.<br>Slide Type<br>• If the input file is<br>Mary had a little lamb<br>Whose fleece was white as snow.<br>And everywhere that Mary went,<br>The lamb was sure to go!<br>Slide Type<br>• then the program produces the output file:<br>/* 1 */ Mary had a little lamb<br>/* 2 */ Whose fleece was white as snow.<br>/* 3 */ And everywhere that Mary went,<br>/* 4 */ The lamb was sure to go!<br>Slide Type<br>• Prompt the user for the input and output file names.<br>

Extracted text: Trusted Edit View Insert Cell Kernel Widgets Help Run Code Slide Type Fragme • Exercise # 1 Write a program that reads a file containing text. Read each line and send it to the output file, preceded by line numbers. Slide Type • If the input file is Mary had a little lamb Whose fleece was white as snow. And everywhere that Mary went, The lamb was sure to go! Slide Type • then the program produces the output file: /* 1 */ Mary had a little lamb /* 2 */ Whose fleece was white as snow. /* 3 */ And everywhere that Mary went, /* 4 */ The lamb was sure to go! Slide Type • Prompt the user for the input and output file names.

Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here