讲解:4COSC001W、Python、Python、ProgrammingWeb|Python

University of Westminster - School of Computer Science & Engineering4COSC001W: Programming Principles I - Assignment Specification (2019/20)Module leader W PurdyUnit Practical ExercisesWeighting: 50%Qualifying mark: 30%Description: Practical WorkLearning OutcomesCovered in thisAssignment:The coursework rationale is:• LO1 Identify program requirements and select appropriate algorithms toimplement them;• LO2 Represent algorithms in a structured manner (e.g., by use of flowdiagrams or pseudo-code);• LO3 Implement algorithms using an algorithmic, strongly typedprogramming language, and design and run appropriate tests on theresulting code;• LO4 Write program code that conforms to norms of good style andmeets generally accepted referencing criteria;Handed Out: 21st October 2019Due Date: Tuesday 19th November at 1:00 PMExpected deliverables:a) Flow chart (Part 1 and Part 2)b) Python program code- Important: Submit your python code file created in IDLE using thename convention: “student_id.py”, e.g. w1234567.py- DO NOT submit your code as word, notepad or a PDF document.c) Test case results (Part 1 and Part 2)d) Demo - Monday 25 November (during your scheduled tutorial)Method of Submission: Submitted online via BlackboardType of Feedback and DueDate:Written feedback and marks 15 working days (3 weeks) after the submissiondeadline. All marks will remain provisional until formally agreed by anAssessment Board.BCS Criteria covered in thisAssignment:2.1.1 Knowledge and understanding of facts, concepts, principles & theories2.1.2 Use of such knowledge in modelling and design2.1.3 Problem solving strategies2.2.1 Specify, design or construct computer-based systems2.2.4 Deploy tools effectively2.3.2 Development of general transferable skills4.1.1 Knowledge and understanding of scientific and engineering principles4.1.2 Knowledge and understanding of mathematical and statistical principlesAssessment regulationsRefer to section 4 of the “How you study” guide for undergraduate students for a clarification of how you areassessed, penalties and late submissions, what constitutes plagiarism etc.Penalty for Late SubmissionIf you submit your coursework late but within 24 hours or one working day of the specified deadline, 10 markswill be deducted from the final mark, as a penalty for late submission, except for work which obtains a mark inthe range 40 – 49%, in which case the mark will be capped at the pass mark (40%). If you submit your courseworkmore than 24 hours or more than one working day after the specified deadline you will be given a mark of zerofor the work in question unless a claim of Mitigating Circumstances has been submitted and accepted as valid.It is recognised that on occasion, illness or a personal crisis can mean that you fail to submit a piece of work ontime. In such cases you must inform the Campus Office in writing on a mitigating circumstances form, giving thereason for your late or non-submission. You must provide relevant documentary evidence with the form. Thisinformation will be reported to the relevant Assessment Board that will decide whether the mark of zero shallstand. For more detailed information regarding University Assessment Regulations, please refer to the followingwebsite: http://www.westminster.ac.uk/study/current-students/resources/academic-regulationsPrinciples I4COSC00W: Assignment Specification Page | 1Coursework DescriptionThe University requires a program to predict progression outcomes at the end of each academicyear. You should write this program in Python using the data shown in Table 1.Part 1 - Student Version1. The program should allow students to predict their progression outcome at the end of eachacademic year.2. The program should prompt for the number of credits at pass, defer and fail and then display theappropriate progression outcome for an individual student.3. The program should let the user know if a credit input is the wrong data type. I.e., ‘Integersrequired’ is displayed.4. The program should let the user know if credits are not in the range 0, 20, 40, 60, 80, 100 and120. I.e., ‘Range error’ is displayed.5. The program should let the user know if the total of the pass, defer and fail credits is not 120.I.e., ‘Total incorrect’ is displayed.• Use conditions and user-defined functions in your solution as appropriate.• Flow Diagram - Before you start to program your solution you should create your flow diagramthat represents your algorithm in a structured manner. Submit flowchart for Part 1 for marking.• Test Plan - A Part 1 test plan is provided in the appendix. Submit the completed test plan (withyour flow diagram and program code) and bring a printed copy of the test plan to the demo.Table 1: Progression outcomes as defined by the University regulations.Volume of Credit at Each LevelPass (including Progression Outcomecondoned pass)Defer Fail1 120 0 0 Progress2 100 20 0 Progress – module trailer3 100 0 20 Progress – module trailer4 80 40 0 Do not Progress – module retriever5 80 20 20 Do not Progress – module retriever6 80 0 40 Do not Progress – module retriever7 60 60 0 Do not progress – module retriever8 60 40 20 Do not progress – module retriever9 60 20 40 Do not progress – module retriever10 60 0 60 Do not progress – module retriever11 40 80 0 Do not progress – module retriever12 40 60 20 Do not progress – module retriever13 40 40 40 Do not progress – module retriever14 40 20 60 Do not progress – module retriever15 40 0 80 Exclude16 20 100 0 Do not progress – module retriever17 20 80 20 Do not progress – module retriever18 20 60 40 Do not progress – module retriever19 20 40 60 Do not progress – module retriever20 20 20 80 Exclude21 20 0 100 Exclude22 0 120 0 Do not progress – module retriever23 0 100 20 Do not progress – module retriever24 0 80 40 Do not progress – module retriever25 0 60 60 Do not progress – module retriever26 0 40 80 Exclude27 0 20 100 Exclude28 0 0 120 ExcludePrinciples I4COSC00W: Assignment Specification Page | 2Part 2 - Staff VersionThis exte4COSC001W代做、Python程序语言调试、Pythonsion should meet the requirements specified for Part 1 but also allow a staff member topredict progression outcomes for multiple students.1. The program should prompt for credits at pass, defer and fail and display the appropriateprogression for each individual student until the staff member user enters ‘q’ to quit.2. When ‘q’ is entered, the program should produce a ‘histogram’ where each star represents astudent who achieved a progress outcome in the category range: progress, trailing, moduleretriever and exclude. See example below.3. The program should display the number of students for each progression category and the totalnumber of outcomes processed.• The program will make use of loops and user-defined functions.• Flow Diagram - Before you start to program your solution you should create your flow diagramthat represents your algorithm in a structured manner. Submit flowchart for Part 2 for marking.• Test Plan – You are required to create your own test plan for Part 2. Submit the completed Part2 test plan (with your flow diagram and program code) and bring a printed copy to the demo.This following horizontal histogram example shows the output distribution for 20 outcomes.However, your program should work with any number of outcomes generated.Progress 10: **********Trailing 5: *****Retriever 3: ***Excluded 2: **20 outcomes in total.Part 3 - Vertical Histogram (optional extension)Extend your program to add an additional histogram that displays vertically so the stars in a categoryshould go downwards and not across the screen, e.g.:Progress Trailing Retriever Excluded * * * * * * *• Hint: as a line is printed decide if each category needs a star or space.• Part 3 does NOT require a flow diagram or a test plan.Part 4 – Alternative Staff Version (optional extension)For this staff version the data will be accessed from a list, tuple or dictionary and NOT from userinput. The data held in the list, tuple or dictionary will match the test cases 1 to 10 shown in theappendix. Use user-defined functions.• Part 4 does NOT require a flow diagram or a test plan.• If attempted, the code for both staff versions (Part 2 and Part 4) must be submitted for marking.Programming Style & ReferencesUse descriptive variable names and reference any code taken from others sources in your program code.Include the following at the top of your program(s).# I declare that my work contains no examples of misconduct, such as plagiarism, or collusion.# Any code taken from other sources is referenced within my code solution.# Student ID: ……………………..…# Date: ……………………..…Principles I4COSC00W: Assignment Specification Page | 3Coursework DemoDemonstrate your working solution to your tutor during your scheduled tutorial. Marks will be allocated foryour ability to answer questions relating to your program. Bring a printed copy of your submitted testcases to the demonstration. NOTE: If you do not attend your demo your Coursework mark will be capped at30 marks.Marking schemeThe Coursework will be marked based on the following marking criteria:Criteria Max. Marks persubcomponentMark percomponentAssignment - Progress OutcomesPart 1 - Student Version (20)• Credits entered & progress outcome displayed.• Use of conditional statements.• Catches input that is the wrong data type• Credits outside range: 0, 20, 40, 60, 80, 100, 120• Credit total not 120• User-defined functionsPart 1 Flow chart (matches submitted program) (9)Part 1 Test plan in Appendix used. Marks allocated where testis PASS & matches submission (7)36 36Part 2 - Staff Version (18)• Predict progression outcomes for multiple students.• User enters ‘q’ to quit.• ‘histogram’ for progress outcomes (progress, trailing,module retriever and exclude)• Category totals and overall total displayed• User-defined functionsPart 2 Flow chart (matches submitted program) (9)Part 2 Student creates own Test Plan (8)35 71Part 3 - Vertical Histogram (optional extension) 4 75Part 4 - Alternative Staff Version (optional extension) 6 81Programming style 2 83Demo – Marks allocated for your ability to answer questionsand demonstrate understanding of your solutions.• If you are cannot explain you code and are unable to pointto a reference within your code of where this code wasfound (i.e., in a textbook or on the internet) then nomarks will be given for the demo of that component.• Part 1 (7)• Part 2 (6)• Part 3 (2)• Part 4 (2)17NOTE: If you do not attend your demo your overall coursework mark will be capped at 30 marksTotal: 100Principles I4COSC00W: Assignment Specification Page | 4APPENDIX 1 – TEST PLAN for Part 1 - Assignment (Progress Outcomes)Submit this completed test plan with your solution code and flow chartStudent Name: Student ID:TestNo.Test Input Expected Result Actual Result (State if notattempted)Pass/Fail1 Pass = 120 ‘Progress’ is displayed2 Pass = 100Defer = 20‘Progress – module trailer’ isdisplayed3 Pass = 100Fail = 20‘Progress – module trailer’ isdisplayed4 Pass = 80Defer = 20Fail = 20‘Do not Progress – moduleretriever’ is displayed5 Pass = 60Defer = 40Fail = 20‘Do not Progress – moduleretriever’ is displayed6 Pass = 40Defer = 40Fail = 40‘Do not Progress – moduleretriever’ is displayed7 Pass = 20Defer = 40Fail = 60‘Do not Progress – moduleretriever’ is displayed8 Pass = 20Defer = 20Fail = 80‘Exclude’ is displayed9 Pass = 20Fail = 100‘Exclude’ is displayed10 Fail = 120 ‘Exclude’ is displayedChecking input data type, credit range and credit total:11 Pass = a ‘Integers required’ displayed12 Defer = b ‘Integers required’ displayed13 Fail = c ‘Integers required’ displayed14 Pass = 2 ‘Range error’ is displayed15 Defer = 5 ‘Range error’ is displayed16 Fail = 10 ‘Range error’ is displayed17 Pass = 100Defer = 40‘Total incorrect’ is displayed18 Pass = 60Fail = 40‘Total incorrect’ is displayedPrinciples I4COSC00W: Assignment Specification Page | 5转自:http://www.6daixie.com/contents/3/4430.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 216,651评论 6 501
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,468评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 162,931评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,218评论 1 292
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,234评论 6 388
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,198评论 1 299
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,084评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,926评论 0 274
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,341评论 1 311
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,563评论 2 333
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,731评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,430评论 5 343
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,036评论 3 326
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,676评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,829评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,743评论 2 368
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,629评论 2 354

推荐阅读更多精彩内容