0% found this document useful (0 votes)
114 views1 page

Python Script Instructions

The document outlines Programming Assignment #5 for CS 270, which involves writing Python scripts for various tasks, including adding/removing line numbers from a text file, changing file name suffixes, backing up files to a .backup directory, and reversing the contents of a text file. The assignment is due on December 10, 2021, and no submission is required, as students are responsible for the material. The document specifies the input and output for the line numbering task as an example.

Uploaded by

api-547507672
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
114 views1 page

Python Script Instructions

The document outlines Programming Assignment #5 for CS 270, which involves writing Python scripts for various tasks, including adding/removing line numbers from a text file, changing file name suffixes, backing up files to a .backup directory, and reversing the contents of a text file. The assignment is due on December 10, 2021, and no submission is required, as students are responsible for the material. The document specifies the input and output for the line numbering task as an example.

Uploaded by

api-547507672
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

CS 270 Programming Assignment #5

Bruce Bolden 20 Points


December 3, 2021 Due: December 10, 2021

Objective: The purpose of this assignment is to write Python scripts (pro-


grams) to perform the actions described below.
Description:

1. Write a script to allow both the additional and removal of line numbers
from a text file.

Input Output Input Output


Now is 01 Now is 01 Now is Now is
the time 02 the time 02 the time the time
to add 03 to add 03 to add to add
numbers 04 numbers 04 numbers numbers

2. Write a script to change file name suffixes, e.g., [Link] → [Link]

3. Write a script to backup files and directories into a special subdirectory


(.backup). Your backup script should handle the case of an existing
file or directory by the same name in .backup.

4. Write a script to reverse the contents of a text file. A text file will be
posted on the web in the near future.

Deliverables:

• No submission required. You are responsible for the material.

You might also like