ECS 32B课程编程 写作、Python编程语言实验

” ECS 32B课程编程 写作、Python编程语言实验ECS 32B: Programming Assignment #2Summer Session #2 2020Contents1 Changelog 12 General Submission Details 13 Grading Breakdown 24 Gradescope Autograder Details 24.1 Released Test Cases vs. Hidden Test Cases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.2 Released Test Cases Inputs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24.3 Changing Gradescope Active Submission . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Ayayron: An Editor That No One in Their Right Mind Would Ever Use 35.1 Part #1 – Loading Keys: load_keys() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35.2 Part #2 – Reading the Edited Files Contents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45.3 Part #3 – Printing the Current File Contents: print_current() . . . . . . . . . . . . . . . . . . . . . . . . . . . 55.4 Part #4 – Saving the Current Files Contents: Save() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75.5 Part #5 – Moving the Cursor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85.5.1 Part #5.1 – Leftward/Rightward Movement: move_left() and move_right() . . . . . . . . . . . . . . . . 85.5.2 Part #5.2 – Upward/Downward Movement and Scrolling the Window: move_up() and move_down() . . . 115.6 Part #6 – Insertion: insert() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195.7 Part #7 – Edit History . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245.7.1 Part #7.1 – Undoing An Insertion: undo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255.7.2 Part #7.2 – Redoing an Insertion: redo() . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 ChangelogYou should always refer to the latest version of this document. v.1: Initial version. v.2: Made it clearer in part #3 the Number of whitespace in certain portions (see red text). v.3: Added autograder details. v.4: Removed minor error in the Example output at top of page 6 where I erroneously had line 5 printed twice.2 General Submission DetailsPartnering on this assignment is prohibited. If you have not already, you should read the section onacademic misconduct in the syllabus.This assignment is due the night of Saturday, August 29. Gradescope will say 12:30 AM on Sunday, August 30, due tothe grace period (as described in the syllabus). Rely on the grace period for extra time at your own risk.Some students tend to email me very close to the deadline. This is a bad idea. There is no guarantee that I will checkmy email right Before the deadline.This content is protected and may not be shared, uploaded, or distributed.ECS 32B课程作业 写作、Python编程语言作业3 Grading BreakdownThe assignment is out of 160 points. Here is a tentative breakdown of the worth of each part. Part #1: 15 Part #2: 20 Part #3: 25 Part #4: 15 Part #5: 30 Part #5.1: 5 Part #5.2: 25 Part #6: 20 Part #7: 35 Part #7.1: 20 Part #7.2: 154 Gradescope Autograder DetailsMore autograder details: Depending on How your code behaves on certain test cases (that it fails), the autograder may take a long time to run. Ina way, this is good in that it will incentivize you to avoid a cycle of making a tiny change, submitting to the autograder,making another tiny change, etc. (You should be comfortable with testing your code by hand on your end.) That aside,you should submit occassionally, and you should be very careful about working on your code during the grace period(like many of you Tend to do). As I said towards the start of this document, doing so is risky. Moreover, if you do asubmission late enough such that you dont even see your score until after the deadline, you risk getting a zero (e.g. ifyou messed something up that caused a syntax error) that you cant change your active submission to avoid, since youpresumably wont have known that that last submission had a syntax error. The autograder ignores trailing whitespace when comparing your output to the expected output. Sometimes (often?), when Gradescope shows you the differences between the expected output and your output, it willbe messy or not that helpful. Sometimes, thats just the way it is. Other times, the messages could be useful if youtook a bit of time to read them closely and interpret them correctly. One thing to note is that when Gradescope isdisplaying the output differences, it does it as if we want to change the expected output to your output (instead of theother way around), so if things seem flipped, that may be why. When a test case in a later part fails, do keep in mind that it could always be due to an error in your code for an earlierpart. Dont ask me how likely this is; that depends on your code.4.1 Released Test Cases vs. Hidden Test CasesYou will not see the results of certain test cases until after the deadline; these are the hidden test cases, and Gradescopewill not tell you whether you have gotten them correct or not until after the deadline. One purpose of this is to promote theidea that you should test if your own code works and not depend solely on the autograder to do it. Unfortunately, Gradescopewill display a dash as your score until after the deadline, but you can still tell if you have passed all of the visible test casesif you see no test cases that are marked Red for your submission.4.2 Released Test Cases InputsSee the document p2_visible_cases_inputs.pdf and the file test_editor.py that are on Canvas.4.3 Changing Gradescope Active SubmissionOnce the deadline occurs, whatever submission is your active submission will be the one that dictates your final score.By default, your active submission will be your latest submission. However, you can change which submission is your activesubmission, which I talk about a small video that you can find on Canvas here. This video is from my ECS 32A course lastsummer session, so the autograder referenced therein is for a different assignment. Note that due to the hidden test cases,your score will show as a dash for all of the submissions, but you can still identify how many of the released test cases yougot correct for each submission.25 Ayayron: An Editor That No One in Their Right Mind Would Ever UseIn this assignment, you will implement a text editor. The only actual editing that this editor will permit is insertion of aphrase on a given line (based On where the cursor is) and the trimming of trailing whitespace. Other helpful operations willinclude movement of the cursor, scrolling, and saving to a file.Your entire submission will be in a file called editor.py. You can find a skeleton version of editor.py and a completeimplementation of the Stack implementation from lecture in stack.py on Canvas. You can change the parameter names of themethods in editor.py, if you wish. You will only submit editor.py to the autograder; the autograder will use its own copy ofstack.py, meaning that you are not allowed to modify this file. So far, the code should just be able to tell you when youveentered an invalid command and should allow you to quit.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导