Question: Write a simple text editor that stores and displays a string of characters using the positional list ADT, together with a cursor object that highlights
Write a simple text editor that stores and displays a string of characters using the positional list ADT, together with a cursor object that highlights a position in this string. A simple interface is to print the string and then to use a second line of output to underline the position of the cursor. Your editor should support the following operations in PYTHON.
left: Move cursor left one character (do nothing if at beginning).
right: Move cursor right one character (do nothing if at end).
insert c: Insert the character c just after the cursor.
delete: Delete the character just after the cursor (do nothing at end).
Step by Step Solution
3.53 Rating (156 Votes )
There are 3 Steps involved in it
To create a simple text editor in Python using a positional list Abstract Data Type ADT along with a cursor object you can follow these steps This will help you understand the structure and operations ... View full answer
Get step-by-step solutions from verified subject matter experts
Document Format (2 attachments)
6096ba966e740_27144.pdf
180 KBs PDF File
6096ba966e740_27144.docx
120 KBs Word File
