国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看

合肥生活安徽新聞合肥交通合肥房產(chǎn)生活服務合肥教育合肥招聘合肥旅游文化藝術(shù)合肥美食合肥地圖合肥社保合肥醫(yī)院企業(yè)服務合肥法律

CSC1002代寫、代做Python編程設(shè)計
CSC1002代寫、代做Python編程設(shè)計

時間:2025-05-08  來源:合肥網(wǎng)hfw.cc  作者:hfw.cc 我要糾錯



CSC1002 – Computational Laboratory
Console-Based Editor - Multi-Line - 2025
OVERVIEW
In this assignment, you are going to design and develop a simple, basic console-based editor to support 
multi-line editing. Unlike the modern, advanced editor such as Microsoft Word which provides users 
with a sophisticated editing environment, utilizing the high-resolution of the graphical screen together 
with the mouse and the keyboard to position and adjust any text and figures displayed on the screen, 
giving us the WYSIWYG (What-You-See-Is-What-You-Get) experience.
In the early days, lacking access to a rich graphical display and mouse, the functionality of editors was 
limited, providing only a much simpler user interface, usually console-based. Editing was carried out 
based on simple text commands entered via the keyboard, commands such as inserting (i) and 
appending (a) a text string, positioning the editor cursor one character position to the left (h), one 
character position to the right (l), one-word position forwards (w), one-word position backwards (b), and
so on. 
 
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
SCOPE
1. Complete all the following editor commands:
• NOTE: Refer to the section “Specific Spec” for more information on particular 
requirements and the section “Assumptions” for any conditions for which the program 
is designed and implemented.
2. Case-sensitive commands - all editor commands are case-sensitive, for example, the capital 
letter ‘A’ does not equal the lowercase letter ‘a’.
3. Command types - most commands are single-letter (in lower case) commands (such as ?, $, x, ^, 
…etc), while some are two-letter (such as dw). Most commands do not require extra input, 
while a few do, such as insert (i) and append (a). 
4. Command prompt (>) - The prompt is a single character string ‘>’ by calling input(‘>’). See the 
screenshots on the first page.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
5. Command Syntax - “Command[Text]”, where “Command” is one of the commands shown in 
step 1, “Text” applies only to commands requiring extra input such as insert (i) and append (a). 
Any commands whose description includes a substring enclosed in “<>” brackets require extra 
input “Text”. “LineNo” is an integer value indicating the line number to which the line cursor 
position is set.
6. Command Parsing - the user types a single command and then presses the return key to 
continue. Parse each command string according to “Command Syntax” to ensure that the input 
string matches EXACTLY one of the commands from step 1, including the extra input “Text” if 
required. When invalid input is entered, simply display another prompt as illustrated in the
following screenshot.
a. Examples of valid command input:
i. “$”
ii. “^” 
iii. “h”
iv. “l”
v. “ahello world”
vi. “i hello world “
b. Examples of invalid command input:
i. “ $”
ii. “ ?”
iii. “? “
iv. “ ahello world”
v. “i”
7. Command Execution - the editor will repeatedly prompt the user to enter an editor command, 
parse the input according to the “Command Syntax”, execute the command (if valid), and then 
output the latest editor content (even there are no changes to the content) on the display 
console (except for commands ‘?’ and ‘q’, see Note follows). After the editor content is 
displayed, the editor will display another prompt (‘>’) on a new line. Refer to the section 
“Sample Output” for more examples.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
Note: when the help command (?) is entered, output only the help menu as shown in step 1; 
when the quit command (‘q’) is entered, terminate the program.
NOTE: 
• Keep your entire source code in ONE SINGLE file.
• Use only Python modules as specified in the “Permitted Modules” section.
• In your design stick ONLY to functions, in other words, no class objects of your own. 
o Furthermore, the lines of code containing the sub-function(s) defined within another 
function will be counted as part of the parent function.
o NOTE: Failure to adhere to the instructions outlined in the assignment handout will 
result in a 50% reduction in the coding style score.
SPECIFIC SPEC
1. Editor content - the editor shows its content, if any, as a single or multiple lines of text string 
constructed by one or multiple Insert/Append/Paste commands. If the row cursor is enabled, it 
shows its position in a color such as green. If the line cursor is enabled, the content will be 
shifted one space to the right to show line cursor as a ‘*’ symbol. When the editor program 
initially starts, its content is empty. Refer to the section “Sample Output” for more examples.
2. Row cursor - it’s used to show where the cursor is on the current row if not empty. In other 
words, the cursor will appear on printable characters including space. The cursor is shown by 
wrapping a character with a pair of escape character strings such as “\033[42m” and “\033[0m”. 
For example, given a string “hello world”, to show the green cursor at the position of the letter 
‘e’, this is the string to print: “h” + “\033[42m” + “e” + “\033[0m” + “llo world”.
3. Insert - the given string “Text” will be inserted to the left of the cursor and the cursor position 
will be changed to the beginning of the “Text” string. 
4. Append - the given string “Text” will be inserted to the right of the current cursor position and 
the cursor position will be changed to the end of the “Text” string.
5. Delete word - delete all characters from the cursor position to the beginning of the next word or 
to the end of the line. When all characters are deleted, the line becomes empty. Refer to the
following figures for an illustration.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
6. Delete Character - delete the character at cursor. When all characters are deleted, the line 
becomes empty. 
7. Cursor left and right - when repositioning the cursor to the left or right, one or multiple 
positions, and if the cursor is already at the far left or far right position, leave the cursor where it 
is.
8. Undo - it’s used to reverse the action of the last valid command, including change(s), if any, 
made to the editor content and/or the cursor (row, line) position(s). Once a command is 
undone, it’s no longer available for future Undo and Repeat. If multiple consecutive undo 
commands are executed, each will undo one command at a time in the reverse order that the 
commands were originally executed. For example, given the last 2 valid commands are “ahello” 
followed by “a world”, the first undo command will reverse the “a world”, and the second 
consecutive undo command will reverse “ahello”. Commands such as “s” and “?’ are not 
candidates for Undo as they do not make any changes to the editor content, the same applies to 
Repeat command. Refer to the following figure for an illustration.
9. Repeat - The “Repeat” command is used to re-execute the last valid command and it offers the 
convenience of sparing the user from retyping it again. Commands “u”, “?”, and “s” are not 
candidates for the “Repeat” command as these commands do not directly update the editor 
content. For example, consider the command sequence: “ahello”, “a world”, “?”, “s” and “u”. If 
the command “r” is subsequently entered multiple times, each Repeat command will always re execute “ahello”. Refer to step “Undo followed by Repeat” for another illustration.
10. Undo followed by Repeat - In this case, the “Undo” is not considered as the last command and 
the "Repeat" command is used to target the command immediately preceding the "Undo" 
command, not the most recent action performed. Any command entered prior to the "Undo" 
will be re-executed upon triggering the "Repeat" command. Refer to the following figure for an 
illustration.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
11. b command - it moves the cursor to the beginning of the word to the left of the cursor, provided 
that such a word exists; if no such word exists, the cursor remains stationary. If the cursor is 
positioned within a word, it will be placed at the first letter of that word. Refer to the following
figure for an illustration.
12. w command - it moves the cursor to the beginning of the word to the right of the cursor, 
provided that such a word exists; if no such word exists, the cursor remains stationary.
13. Word - a word is defined as a sequence of consecutive characters including punctuation but not 
white space, in other words, any group of characters without spaces is considered a single word, 
even if it includes punctuation marks. Refer to the following figure for an illustration.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
14. Line Copy - it’s used to copy or duplicate the content of the current line, including newly 
inserted empty lines. The copied line is then pasted into the editor content using the Paste 
command. Only one copied line is kept at a time, in other words, subsequent “Line Copy” will 
replace the cached line with the content of the current line. When the editor’s content is 
empty, the Line Copy command will not perform any action.
15. Line cursor - it’s used to show the current row being edited by prefixing it with a character ‘*’, 
while other rows are shown with a single space. Refer to the following figure(s) for an 
illustration.
16. Cursor up and down - when repositioning the cursor to the line either above or below and if its 
length is shorter, position the cursor to the end of the line (similar to ‘$’). If the cursor is already 
on the first or the last line, do not jump the cursor from top to bottom and vice versa, in other 
words, leave the row cursor where it is. Refer to the following figure(s) for an illustration.
17. Empty Line insert Above/Below - it inserts an empty row above or below the current line and
adjusts the line cursor accordingly. Refer to the following figure(s) for an illustration.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
18. Line Paste Above/Below - it pastes the last copied line(s) above or below the current line and 
adjusts the line cursor accordingly. Adjust the row cursor position as if it was re-positioned by 
having it moved up or down from the current line to the pasted line. Refer to the following 
figure(s) for an illustration.
19. Line Delete - delete the current line and adjusts the line and row cursors accordingly. Refer to 
the following figure(s) for an illustration.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
ASSUMPTIONS
1. The goal of this assignment is to illustrate the benefits of “Problem Decomposition”, “Clean 
Coding” and “Refactoring”, all together achieving high code readability to ease logic expansion 
and keep high maintainability, therefore, it’s not aimed at designing a complex, general-purpose 
editor for handling large editing content. 
2. It’s assumed that the length of each line is kept within a reasonable length so that each line can 
be stored directly using the standard Python ‘str’ type. The number of lines is also kept within a 
reasonable number so that all lines can be kept in one standard Python list and the lines can be 
efficiently updated using the standard list and str operations such as append, insert, slicing, 
cloning, …etc.
3. Each test case is designed to evaluate the functionality and correctness of your program, rather 
than its speed, performance and memory usage. Each test case consists of multiple editing 
commands with short “Text” and small “Repeater” values.
4. The text editor is required to handle only regular English characters, thus additional unicode 
support, if any, is unnecessary.
STARTUP OPTIONS
Not applicable
SKILLS
In this assignment, you will be trained on the use of the followings:
• Refactoring - logic reuse or simplification based on the existing logic.
• Variable scope: global, local and function parameters.
• Coding Styles (naming convention, meaningful names, comments, doc_string, …etc)
• Problem Decomposition, Clean Code, Top-Down Design
• Functions (with parameters and return) for program structure and logic decomposition
• Standard objects (strings, numbers & lists)
• Variable Scope
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
PERMITTED MODULES
Only the following Python module(s) is allowed to be used:
• re (regular expression)
DELIVERABLES
Program source code (A3_School_StudentID.py), where School is SSE, SDS, SME, HSS, FE, LHS, MED and 
StudentID is your 9-digit student ID.
For instance, a student from SME with student ID “119010001” will name the Python file as follows:
• A3_SME_119010001.py:
Ensure that your source file is saved in standard, regular UTF-8 encoding format. On the status bar of 
Visual Studio Code, you can view the current encoding format as follows:
On an occasion, the encoding scheme is set to UTF-8 with BOM as follows:
The presence of the Byte Order Mark (BOM) could be due to copying from websites, older version of 
editor, file conversion from other sources, default encoding setting, and so on. 
Confirm the encoding scheme is UTF-8 and the file name is correct, then submit the plain program file to 
the corresponding assignment folder. A deduction of 5% will be penalized if the file is incorrectly named 
or in wrong encoding format.
TIPS & HINTS
• Apply problem decomposition, Clean Code and Refactoring as illustrated during classes.
• Beware of variable scope as you might keep a few variables as global such as current editor 
content, cursor position, undo buffer, and so on.
• Refer to Python website for program styles and naming conventions (PEP 8)
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
SAMPLE OUTPUT
Note: please also refer to the first assignment for more sample output.
CSC1002 – 2025 Winter By Kinley Lam
CSC1002 – Computational Laboratory
MARKING CRITERIA
• Coding Styles – overall program structure including layout, comments, white spaces, naming 
convention, variables, indentation, functions with appropriate parameters and return.
• Program Correctness – whether or the program works 100% as per Scope. 
• User Interaction – how informative and accurate information is exchanged between your 
program and the player.
• Readability counts – programs that are well structured and easy to follow using functions to 
break down complex problems into smaller cleaner generalized functions are preferred over a 
function embracing a complex logic with many nested conditions and branches! In other words, 
a design with a clean architecture and high readability is the predilection for the course 
objectives over efficiency. The logic in each function should be kept simple and short, and it 
should be designed to perform a single task and be generalized with parameters as needed.
• KISS approach – Keep It Simple and Straightforward.
• Balance approach – you are not required to come up with a very optimized solution. However, 
take a balance between readability and efficiency with good use of program constructs. 
DUE DATE
May 5th, 2025, 11:59PM
ITEMS PERCENTAGE REMARKS
CODING STYLES 30%-40% 0% IF PROGRAM DOESN’T RUN
FUNCTIONALITY 60%-70% REFER TO SCOPE
CSC1002 – 2025 Winter By Kinley Lam

請加QQ:99515681  郵箱:99515681@qq.com   WX:codinghelp

掃一掃在手機打開當前頁
  • 上一篇:ECE371編程代做、代寫Python程序設(shè)計
  • 下一篇:代做ENVM Species Distribution 、代寫Python
  • 無相關(guān)信息
    合肥生活資訊

    合肥圖文信息
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科技CAE仿真
    流體仿真外包多少錢_專業(yè)CFD分析代做_友商科
    CAE仿真分析代做公司 CFD流體仿真服務 管路流場仿真外包
    CAE仿真分析代做公司 CFD流體仿真服務 管路
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真技術(shù)服務
    流體CFD仿真分析_代做咨詢服務_Fluent 仿真
    結(jié)構(gòu)仿真分析服務_CAE代做咨詢外包_剛強度疲勞振動
    結(jié)構(gòu)仿真分析服務_CAE代做咨詢外包_剛強度疲
    流體cfd仿真分析服務 7類仿真分析代做服務40個行業(yè)
    流體cfd仿真分析服務 7類仿真分析代做服務4
    超全面的拼多多電商運營技巧,多多開團助手,多多出評軟件徽y1698861
    超全面的拼多多電商運營技巧,多多開團助手
    CAE有限元仿真分析團隊,2026仿真代做咨詢服務平臺
    CAE有限元仿真分析團隊,2026仿真代做咨詢服
    釘釘簽到打卡位置修改神器,2026怎么修改定位在范圍內(nèi)
    釘釘簽到打卡位置修改神器,2026怎么修改定
  • 短信驗證碼 寵物飼養(yǎng) 十大衛(wèi)浴品牌排行 suno 豆包網(wǎng)頁版入口 目錄網(wǎng) 排行網(wǎng)

    關(guān)于我們 | 打賞支持 | 廣告服務 | 聯(lián)系我們 | 網(wǎng)站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網(wǎng) 版權(quán)所有
    ICP備06013414號-3 公安備 42010502001045

    国产人妻人伦精品_欧美一区二区三区图_亚洲欧洲久久_日韩美女av在线免费观看
    国产精品久久7| 亚洲 欧美 日韩 国产综合 在线 | 欧美日韩亚洲综合一区二区三区激情在线 | 日本一区免费在线观看| 69av在线播放| 日韩av免费网站| 无码av天堂一区二区三区| 欧美成人精品在线播放| 99国产精品久久久久老师| 色综合久久88色综合天天提莫| 久久频这里精品99香蕉| 日韩极品视频在线观看| 国产精品日韩精品| 成人av在线亚洲| 日本一道本久久| 日本一欧美一欧美一亚洲视频| 日本中文字幕成人| 日韩人妻无码精品久久久不卡| 国产精品老女人精品视频| 国产欧美在线视频| 亚洲一区二三| 久久久久久亚洲精品不卡| 日韩欧美一级在线| 欧美综合国产精品久久丁香| 伊人久久在线观看| 国产成人精品一区二区| 国产精品亚洲第一区| 国产麻豆乱码精品一区二区三区| 日本天堂免费a| 人体精品一二三区| 国产自偷自偷免费一区| 性一交一乱一伧国产女士spa| 水蜜桃亚洲一二三四在线| 日韩精品在在线一区二区中文| 欧美视频在线第一页| 亚洲日本精品一区| 日本午夜人人精品| 欧美综合在线播放| 国产精品自产拍高潮在线观看| 91精品国产高清久久久久久91 | 久久精品99国产精品酒店日本 | 欧美一级片免费观看| 欧美日韩在线观看一区| 国产日韩欧美综合| 欧美亚洲在线视频| 国产亚洲天堂网| 91精品成人久久| 久久国内精品一国内精品| 国产精品久久久久久久久久久久 | 国产成人综合av| 国产精品一区二区免费在线观看| 国产精国产精品| 国产精品久久久久久久久久直播| 亚洲在线观看一区| 黄色国产小视频| 日韩精品一区二区三区四| 毛葺葺老太做受视频| 欧美高清视频一区二区三区在线观看| 国产一区免费在线| 久久riav| www.日韩视频| 一区二区高清视频| 欧美中文字幕精品| 91精品啪在线观看麻豆免费| 国产精品久久久久免费a∨| 午夜精品久久久久久久久久久久| 蜜臀av无码一区二区三区| 久久免费高清视频| 九色成人免费视频| 欧美日韩第一视频| 国产精品成人久久电影| 午夜精品在线观看| 国产日韩欧美视频| 久久久999成人| 国产精品对白刺激| 色中色综合成人| 国产欧美精品一区二区三区介绍| 日韩在线小视频| 久久久91精品国产一区不卡| 动漫一区二区在线| 成人精品一二区| 精品国产一区二区三区久久久久久 | 午夜一区二区三视频在线观看| 精品少妇一区二区三区在线| www.色综合| 人人做人人澡人人爽欧美| 久久这里只有精品8| 中文字幕一区二区三区有限公司| 免费一级特黄特色毛片久久看| 日韩中文字在线| 日本www高清视频| 久久久久久www| 日韩av免费网站| 久久全国免费视频| 视频一区亚洲| 久久青青草原一区二区| 性高潮久久久久久久久| 91精品国产高清自在线看超| 一本色道久久综合亚洲二区三区| 国产美女久久精品| 亚洲影院在线看| 91精品在线看| 亚洲高清视频一区| 日韩久久一级片| 国产黄色片免费在线观看| 亚洲免费在线精品一区| 91精品中国老女人| 少妇av一区二区三区无码| 国产不卡一区二区三区在线观看| 日韩videos| 色婷婷综合久久久久| 秋霞在线一区二区| 国产精品视频网站在线观看| 欧美日韩精品综合| 欧美美最猛性xxxxxx| 成人h在线播放| 日韩最新中文字幕| 国产成人啪精品视频免费网| 免费观看亚洲视频| 一区二区三区免费看| 欧美日韩视频在线一区二区观看视频| 国产精品视频区| 国产日韩亚洲欧美在线| 亚洲啪啪av| 久久久久久国产精品免费免费| 加勒比成人在线| 色综合视频一区中文字幕| 91精品视频观看| 日本国产精品视频| 久久亚洲精品一区| 国产精品aaa| 两个人的视频www国产精品| 国产伦精品一区二区三区四区视频_ | 91九色蝌蚪成人| 日韩精品视频一区二区在线观看| 国产精品视频一区二区三区四区五区 | 欧美激情精品久久久| 国产精品91免费在线| 日韩伦理一区二区三区av在线| 国产精品福利在线观看网址| 99爱精品视频| 欧美精品亚洲| 欧美激情视频给我| 国产成人精品999| 国产日韩在线观看av| 日本久久91av| 欧美精品手机在线| 久久久久久亚洲精品中文字幕| 国产欧美丝袜| 欧美一区二三区| 亚洲高清在线观看一区| 国产精品久久久久77777| 国产精品a久久久久久| av色综合网| 久久国产精品电影| 久久人妻无码一区二区| 蜜桃网站成人| 日韩精品免费一区| 一区二区国产日产| 国产精品成人免费电影| 久久草.com| 91高潮精品免费porn| 国产日韩欧美另类| 欧美精品卡一卡二| 日本不卡视频在线播放| 亚洲精品国产精品久久| 欧美日韩国产成人| 久久国产精品电影| 久久精品亚洲热| 国产传媒久久久| 白嫩少妇丰满一区二区| 国产色综合天天综合网| 欧美 日韩 国产 高清| 日本不卡免费高清视频| 亚洲第一综合网站| 中文字幕一区二区三区四区五区人 | 国产裸体免费无遮挡| 国模精品视频一区二区三区| 欧美在线www| 欧美中日韩免费视频| 水蜜桃亚洲精品| 亚洲国产日韩美| 亚洲精品一区二| 一区二区三区四区视频在线观看| 精品成在人线av无码免费看| 欧美xxxx综合视频| 国产精品久久97| 国产精品裸体瑜伽视频| 国产精品视频一区二区三区经 | 精品视频一区二区三区四区| 欧美日韩国产综合视频在线| 欧美专区日韩视频| 日本aa在线观看| 日韩欧美一区二区三区四区五区| 性高潮久久久久久久久| 欧美一级片久久久久久久| 日产精品高清视频免费| 日韩视频在线观看国产| 日韩欧美精品在线观看视频| 欧美午夜精品久久久久免费视|