Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 Assessment Details and Submission Guidelines Trimester T1 2021 Unit Code BN108 Unit Title Programming for Networking Assessment...

1 answer below »
BN108



Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 Assessment Details and Submission Guidelines Trimester T1 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 (11/04/2021) Part B: Week 8 (13/05/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 procedure available 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. https://www.mit.edu.au/about-us/governance/institute-rules-policies-and-plans/policies-procedures-and-guidelines/assessment-policy https://www.mit.edu.au/about-us/governance/institute-rules-policies-and-plans/policies-procedures-and-guidelines/assessment-policy https://www.mit.edu.au/about-us/governance/institute-rules-policies-and-plans/policies-procedures-and-guidelines/assessment-policy http://www.mit.edu.au/about-mit/institute-publications/policies-procedures-and-guidelines/special-considerationdeferment http://www.mit.edu.au/about-mit/institute-publications/policies-procedures-and-guidelines/Plagiarism-Academic-Misconduct-Policy-Procedure http://www.mit.edu.au/about-mit/institute-publications/policies-procedures-and-guidelines/Plagiarism-Academic-Misconduct-Policy-Procedure http://www.mit.edu.au/about-mit/institute-publications/policies-procedures-and-guidelines/Plagiarism-Academic-Misconduct-Policy-Procedure BN108 Programming for Networking Page#2 of 5 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 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 can be divided into three distinct areas of activity: 3 Marks i. Problem definition and requirement gathering ii. Creating a structured solution (or algorithm) iii. Coding (e.g. Java, Python, C++) For the given problem definition, provide a structured solution (or algorithm): A student wants to submit an assignment on Moodle for unit BN108. The assignment file is stored on the Desktop folder in her/his laptop. Currently, the laptop is powered off. 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. In the example, What are the knowns and the unknowns? Where, if anywhere, is there ambiguity? What assumptions have you made about the problem? Provide a structured solution (algorithm): [1+1+1+4= 7 Marks] BN108 Programming for Networking Page#3 of 5 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 5. Write statements in python for the following math equations: 4 Marks ?? = √12.3??4 − 9.1??3 − 4.6?? + 34.2 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 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 sentences 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 sentences 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 sentences as well as acronyms in it. 8 Marks https://learning.oreilly.com/library/view/Head+First+Learn+to+Code/9781491958858/ch01.html#one_thinking_computationally_getting_star BN108 Programming for Networking Page#4 of 5 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 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 second 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. [44, 33, 22, 11] b. Write a Python function that takes the result of 3a and returns its square. c. Print the result of 3b in the main call. Refer to stub assignment1_partB_function.py END OF PART B Refer to “Requirements for Assignment Submission” on the next page BN108 Programming for Networking Page#5 of 5 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 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. Problem description of the assignment iii. Flow charts, algorithms and program code in the Word file. iv. Include all Python scripts (.py files), where applicable. v. Screen shot/captures of all the programs outputs. vi. Acknowledgment of any help received for assignment completion, such as book, website etc. • 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 BN108 Programming for Networking Page#6 of 5 Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 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
Answered 6 days AfterApr 02, 2021BN108

Answer To: Prepared by Dr Huma Chaudhry Moderated by: Prof. Paul Kwan March 2021 Assessment Details and...

Sandeep Kumar answered on Apr 08 2021
142 Votes
text/code.py
file = open('file.txt','rt')
data = file.read()
words = data.split()
x = len(words)

print('Total number of sentences are ' + str(x))
import re
pattern =r'([A-Z][a-zA-Z]*[A-Z]|(?:[A-Z]\.)+)'
y = re.findall(pattern, data)
z = len(y)
print("Total acronyms are "+ str(z)+ ' which are '+str(y))
text/file.txt
This is- one of the most surprising, entertaining and brilliantly-planned software books I’ve ever read!It’s more interesting and better thought-out than all other beginning programming books I know put together. I run into people all the time who 'need to learn programming and want to know what...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here