99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

合肥生活安徽新聞合肥交通合肥房產生活服務合肥教育合肥招聘合肥旅游文化藝術合肥美食合肥地圖合肥社保合肥醫院企業服務合肥法律

CSC1002代寫、代做Python編程設計
CSC1002代寫、代做Python編程設計

時間:2025-05-08  來源:合肥網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程序設計
  • 下一篇:代做ENVM Species Distribution 、代寫Python
  • 無相關信息
    合肥生活資訊

    合肥圖文信息
    2025年10月份更新拼多多改銷助手小象助手多多出評軟件
    2025年10月份更新拼多多改銷助手小象助手多
    有限元分析 CAE仿真分析服務-企業/產品研發/客戶要求/設計優化
    有限元分析 CAE仿真分析服務-企業/產品研發
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    急尋熱仿真分析?代做熱仿真服務+熱設計優化
    出評 開團工具
    出評 開團工具
    挖掘機濾芯提升發動機性能
    挖掘機濾芯提升發動機性能
    海信羅馬假日洗衣機亮相AWE  復古美學與現代科技完美結合
    海信羅馬假日洗衣機亮相AWE 復古美學與現代
    合肥機場巴士4號線
    合肥機場巴士4號線
    合肥機場巴士3號線
    合肥機場巴士3號線
  • 短信驗證碼 trae 豆包網頁版入口 目錄網 排行網

    關于我們 | 打賞支持 | 廣告服務 | 聯系我們 | 網站地圖 | 免責聲明 | 幫助中心 | 友情鏈接 |

    Copyright © 2025 hfw.cc Inc. All Rights Reserved. 合肥網 版權所有
    ICP備06013414號-3 公安備 42010502001045

    99爱在线视频这里只有精品_窝窝午夜看片成人精品_日韩精品久久久毛片一区二区_亚洲一区二区久久

          9000px;">

                欧美日韩精品一区二区天天拍小说 | 一区二区三区中文在线观看| 一区二区在线电影| 午夜精品123| 成人高清免费在线播放| 欧美一级欧美三级| 亚洲欧美成人一区二区三区| 国产一区二区三区观看| 精品视频在线视频| 国产精品视频免费看| 久久精品噜噜噜成人av农村| 欧美日韩精品系列| 亚洲欧美乱综合| 成人在线视频首页| 久久久www成人免费毛片麻豆| 午夜激情综合网| 一本大道久久a久久综合| 国产欧美精品在线观看| 精品在线免费视频| 欧美一区二区三区爱爱| 亚洲国产精品影院| 色婷婷激情一区二区三区| 国产婷婷精品av在线| 麻豆成人在线观看| 欧美一级免费大片| 无码av免费一区二区三区试看 | 精品一区二区三区在线播放视频| 欧美午夜寂寞影院| 26uuu国产一区二区三区| 亚洲成a人片在线不卡一二三区| 成人午夜视频福利| 久久众筹精品私拍模特| 日韩专区在线视频| 欧美亚洲日本国产| 亚洲视频在线一区观看| 国产精品1区2区3区在线观看| 欧美亚洲动漫精品| 综合久久国产九一剧情麻豆| 国产高清不卡一区二区| 日韩色视频在线观看| 亚洲一区成人在线| 色av成人天堂桃色av| 日本一区二区三区电影| 日av在线不卡| 又紧又大又爽精品一区二区| 成人天堂资源www在线| 综合av第一页| 欧美绝品在线观看成人午夜影视| 亚洲高清久久久| 久久精品亚洲国产奇米99| 欧美性生交片4| 国产精品亚洲视频| 日本欧美肥老太交大片| 亚洲丝袜自拍清纯另类| 欧美va亚洲va香蕉在线| 91视频www| 国产成人午夜精品5599| 亚洲人成亚洲人成在线观看图片| 日韩免费看的电影| 亚洲日本一区二区| 日韩一级片网址| 亚洲一区二区影院| 欧美日韩国产精选| 91精品福利视频| 日韩欧美色综合| 免费av成人在线| 韩国精品一区二区| 日韩午夜电影在线观看| 免费不卡在线观看| 久久网这里都是精品| 国产九色sp调教91| 日本一区二区久久| 高清shemale亚洲人妖| 国产精品护士白丝一区av| 色综合久久中文字幕| 性欧美疯狂xxxxbbbb| 精品免费视频.| 国产精品白丝jk黑袜喷水| 国产精品欧美一级免费| 777奇米成人网| 激情综合亚洲精品| 国产精品大尺度| 欧美午夜电影网| 精品在线视频一区| 中文字幕一区在线观看| 8v天堂国产在线一区二区| 国产成人激情av| 亚洲一二三区视频在线观看| 精品久久久久一区| 91首页免费视频| 蜜桃精品在线观看| 日韩毛片在线免费观看| 日韩天堂在线观看| 色婷婷狠狠综合| 国产一区二区不卡| 亚洲一区在线观看免费观看电影高清 | 在线看国产日韩| 免费成人结看片| 亚洲免费观看视频| 精品处破学生在线二十三| 99国产精品久久久久久久久久| 日本v片在线高清不卡在线观看| 久久久久免费观看| 69精品人人人人| 国产一区二区调教| 亚洲国产美女搞黄色| 中文字幕精品三区| 日韩女优视频免费观看| 欧美亚洲精品一区| 国产黄人亚洲片| 日本欧美一区二区在线观看| 伊人婷婷欧美激情| 国产精品久久久久三级| 欧美日韩视频在线一区二区| 高潮精品一区videoshd| 蜜臀av一区二区在线观看| 亚洲欧美日韩久久精品| 久久婷婷色综合| 日韩欧美亚洲另类制服综合在线| 91美女蜜桃在线| 91丨九色丨蝌蚪丨老版| 国产69精品久久99不卡| 国内精品视频666| 免费观看在线色综合| 亚洲综合在线观看视频| 国产精品入口麻豆原神| 精品国产91洋老外米糕| 精品成人在线观看| 日韩精品一区二| 欧美精品久久天天躁| 91成人免费电影| 91在线观看成人| 成人一级视频在线观看| 国产精品自在欧美一区| 国内不卡的二区三区中文字幕| 日本中文字幕一区二区视频| 天天影视网天天综合色在线播放| 一个色综合av| 亚洲与欧洲av电影| 午夜在线成人av| 久久国产三级精品| 精品在线免费视频| 国产自产高清不卡| 成人高清视频在线| 91免费国产在线| 91福利国产精品| 欧美日韩视频不卡| 欧美草草影院在线视频| 久久久不卡影院| xf在线a精品一区二区视频网站| 久久―日本道色综合久久| 国产欧美综合色| 中文字幕一区二| 一区二区三区在线观看动漫| 亚洲国产日韩a在线播放| 蜜桃一区二区三区在线| 国产精品12区| 成人av网站免费观看| 一本色道亚洲精品aⅴ| 欧美精品久久一区二区三区| 精品入口麻豆88视频| 欧美激情一区三区| 国产精品乱码一区二区三区软件| 中文字幕中文字幕在线一区 | 51精品视频一区二区三区| 欧美高清激情brazzers| 久久一留热品黄| 国产精品国产三级国产普通话蜜臀 | 国产一区二区三区| 成人午夜激情片| 日本韩国一区二区| 日韩午夜精品视频| 国产清纯美女被跳蛋高潮一区二区久久w | 久久精品99国产精品| 成人美女在线观看| 欧美日韩成人高清| 中文字幕精品三区| 视频在线在亚洲| 97se亚洲国产综合自在线观| 欧美一区二区视频在线观看| 久久亚洲精华国产精华液| 亚洲欧美偷拍卡通变态| 奇米777欧美一区二区| 99久久精品99国产精品| 日韩美女一区二区三区四区| 亚洲精品欧美二区三区中文字幕| 免费成人美女在线观看| 色综合天天综合狠狠| 久久理论电影网| 日韩专区一卡二卡| 91在线观看美女| 精品久久久久久综合日本欧美| 伊人色综合久久天天人手人婷| 精品综合免费视频观看| 欧美伊人久久久久久久久影院| 精品少妇一区二区三区在线播放| 一区二区免费在线播放| 麻豆中文一区二区| 欧美少妇bbb| 一区二区在线免费观看|