part 1B needs to e done
BN108Programming for Networking Page#9 of 5 Assessment Details and Submission Guidelines Trimester T2 2021 Unit Code BN108 Unit Title Programming for Networking Assessment Type Individual Assessment Title Programming fundamentals Purpose of the assessment (with ULO Mapping) This assignment assesses the basic concepts of programming; students should be able to demonstrate their achievements in the following unit learning outcomes: b. interprets a user’s needs while dealing with simple program specifications; e. Apply basic control structures sequence, repetition, and selection to program development f. produces simple interactive applications. Weight 20% Total Marks Part A: 20 marks Part B: 55 marks Word limit Not applicable Due Date Part A: Week 3 (08/Aug/2021) Part B: Week 8 (12/Sept/2021) Submission Guidelines · All work must be submitted on Moodle by the due date along with a completed Assignment Cover Page. · The assignment must be in MS Word format, 1.5 spacing, 11-pt Calibri (Body) font and 2 cm margins on all four sides of your page with appropriate section headings. · Reference sources must be cited in the text of the report, and listed appropriately at the end in a reference list using IEEE referencing style. Extension If an extension of time to submit work is required, a Special Consideration Application must be submitted directly on AMS. You must submit this application three working days prior to the due date of the assignment. Further information is available at: https://www.mit.edu.au/about-us/governance/institute-rules-policies-and-plans/policies-procedures-and-guidelines/assessment-policy Academic Misconduct · Academic Misconduct is a serious offence. Depending on the seriousness of the case, penalties can vary from a written warning or zero marks to exclusion from the course or rescinding the degree. Students should make themselves familiar with the full policy and procedureavailable at: http://www.mit.edu.au/about-mit/institute-publications/policies-procedures-and-guidelines/Plagiarism-Academic-Misconduct-Policy-Procedure. For further information, please refer to the Academic Integrity Section in your Unit Description. Assignment Tasks This assignment is divided into two components. The first component (Part A) focuses on design and analysis phase to solve simple problems. The second component (Part B) is focused on applying basic control structures and functions. Part A is Due in Week 3 and Part B in Week 8. A report is to be submitted for both parts separately on the respective Moodle links. PART A: Problem Solving, Expressions and Operations: (20 Marks) 1. How does a computer understand a programming language? 2 Marks 2. Computer programming is fun but sometimes we get a bug. 3 Marks A software programmer was given a task to ask a user for their dog’s age and convert that age in relative human years. To perform the calculation, she has to multiply the dog’s chronological age by the number 7 and print the result. Analyse the following code and remove the bug: dog_name=input(“What is your dog’s name? ”) dog_age=input(“What is your dog’s age?”) human_age=dog_age * 7 print(human_age) 3. When you’re writing long numbers, you can group digits using underscores to make large numbers more readable: >>> universe_age = 20_000_000_000 Print the above variable on the python shell prompt. Add 12 billion to it and print the result. 2 Marks 4. A student has to enrol a unit at your institute, XIT. To be eligible for enrolments, XIT checks for various requirements, such as, did s/he pass pre-requisites with a minimum grade ‘P’ etc. You may include any other requirement(s) also. (1+1+1+4= 7 Marks) In the example, a. What are the knowns and the unknowns? b. Where, if anywhere, is there ambiguity and what assumptions have you made about the problem? c. Write a pseudocode for the given problem. d. Provide a flowchart for the given problem. 5. Write statements in python for the following math equations: 4 Marks Evaluate the above expression at the following values of variable x: x =2, x =-2 6. Test and justify the output of the following expressions: 2 Marks a. (2 * (10 % 5)) b. 9/3*4+6%2*2/2*3. PART B – Algorithms and Functions –(40 Marks + 5 Marks for Comment + 10 Marks for Demo) 1. A text analyst wants to analyse a text file (refer to File.txt on Moodle). She wants to find out the total number of questions in the text file. She would also like to know if there are acronyms in the text file and keep a count of them so that she can improve the text file later. “Computational thinking is a way of thinking about problem solving that grew out of computer science. With computational thinking we learn how to break problems down, to create algorithms to solve them, and to generalize those solutions so we can solve even bigger problems. Often, though, we want to teach a computer to execute those algorithms for us, and that’s where coding comes in.”[1] a. Write a detailed algorithm and illustrate the problem design with the help of a flowchart to count the total number of questions and acronyms in the text file. 6+6 Marks b. Write a program in python that takes the text file as input and displays the count of questions as well as acronyms in it.8 Marks 2. A list is made from zero or more elements, separated by commas and surrounded by square brackets. Refer to the following examples of lists: 10 Marks a. Pick a list of your choice from the examples above. State why you chose it. b. You can extract a single member from a list by specifying its offset. Get the third member from your list. c. The append function can add a new member/value into a list! Add your MIT ID in your list from 2a. d. Combine the list of your choice with another list. e. A negative index can help you easily reverse a list [::-1]. Reverse your new list while skipping every second member. e.g. leap_years = [2000, 2008] 3. This question assesses your knowledge of functions: 10 Marks a. Write a Python function to sum all the numbers passed to it in a list. [3, -7, 31, ‘2021’] b. Write a Python function that takes the result of 3a and returns its square. c. Print the result of 3b by calling these functions in main( ). Refer to stub assignment1_partB_function.py END OF PART B Refer to “Requirements for Assignment Submission” on the next page FUNCTIONAL/NONFUNCTIONAL REQUIREMENTS FOR ASSIGNMENT SUBMISSION · Your assignment should include the following in the Word file: i. An overview of your learning in assignment 1 with respect to the learning outcomes and graduate attributes defined in the Unit Description. ii. Flow charts, algorithms and program code in the Word file. iii. Include all Python scripts (.py files), where applicable. iv. Screen shot/captures of all the programs outputs. v. Acknowledgment of any help received for assignment completion, such as book, website etc. Cite all sources in IEEE format. · These programs have to be demonstrated in the week 7/8 lab sessions. Being absent or failing to demonstrate or remaining silent during the interview may reduce your score drastically. · Include brief comments in your code identifying yourself, describing the program, and describing key portions of the code. · Assignments are to be done individually and must be your own work. Software may be used to detect academic dishonesty (cheating). · Use Python coding conventions and good programming techniques. For example: · Meaningful variable names · Conventions for naming variables and constants · Use of constants where appropriate · Readability, indentation, and consistency Note - Each student will be interviewed during the lab session in week 7/8. The purpose of this interview is to ask you questions about the assessment submission you have made and your interpretation of the work. Refer to “Marking Guide” on the next page MARKING CRITERIA: Description of criteria Marks Assignment report PART A 20 · Q1 Brief explanation 2 · Q2 Algorithm 3 · Q3 Addition to long int + screenshot of code 2 · Q4 Problem analysis 7 · Q5 Equation format + eval x=2 + eval x=-2 4 · Q6 Screenshot of output and its justification through stepwise explanation 2 Assignment report PART B 40+5+10 · Q1 a. Algorithm + Flowchart b. Python Code + Output format 12 8 · Q2 Processing List(s) 10 · Q3 Function sum + square + call to function in main() 3+3+4 · Comments describing the program, methods, author and date 5 · Demo (PART B) 10 Total 75 Assignment code Demo Each student will be interviewed during a lab session regarding their submission to gauge your personal understanding of your assignment code. The purpose of this is to ensure that you have completed the code yourself and that you understand the code submitted. Mark will be scaled accordingly. (DEMO Rubric on next page) DEMO Rubric 0 The student cannot answer even the simplest of questions There is no sign of preparation They probably haven’t seen the code before 2 There is some evidence the student has seen the code The answer to a least one question contained some correct points But it’s clear they cannot engage in a knowledgeable discussion about the code 5 The student seems underprepared Answers are long winded and only partly correct They seem to be trying to work out the code as they read it They seem to be trying to remember something they were told but now can’t remember However they clearly know something about the code With prompting they fail to improve on a partial or incorrect answer 7.5 The student seems reasonably well prepared Questions are answered correctly for the most part but the speed and/or confidence they are answered with is not 100% With prompting they can add a partially correct answer or correct an incorrect answer 10 The student is fully prepared All questions were answered quickly and confidently It’s absolutely clear that the student has performed all of the coding themselves. Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan JULY 2021 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan JULY 2021