Question: Line editor; creating a program with a few command lines in python. example: insert 5 - inserts an empty line at position 5. line 5

Line editor; creating a program with a few command lines in python.

example: insert 5 - inserts an empty line at position 5. line 5 will become line 6, 6 will become 7. etc. If there is no line from 1 to 4, then it'll be created by the command.

typeover 5 the contents in line 5 are replaced by content between < >. If line 5 doesnt exist, the command is ignored.

printall will print the contents from beginning to end.

When you first start the program, you must use insert to create a line/lines. then typeover, etc. readall to see what you have entered.

So it should be something like this;

please enter a command: insert 3

please enter a command: typeover 2

please enter a command: printall

1.

2. hello

3.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!