Python programming language

CSE1PE Assessable Tutorial B Page 1 of 4
La Trobe University
Department of Computer Science and Information Technology
CSE1PE Assessable Tutorial B
This assessment is worth 10% of your PE grade
Objective
To demonstrate your basic knowledge and understanding of both the Python programming language and
the steps in software development.
Due Date
Sunday 10th May 2020 at 11:50pm
Delays caused by computer downtime cannot be accepted as a valid reason for a late submission without
penalty. Students must plan their work to allow for both scheduled & unscheduled downtime.
Academic Integrity
This is an individual assignment. You are explicitly instructed to not work in groups.
When submitting the assignment, students are required to submit their own work only. La Trobe University
treats plagiarism seriously. When detected, penalties are strictly imposed.
Submission Guidelines
You are required to submit your solutions to the LMS under the Assessment tab. The file you submit should
be either a pdf or a docx file.
For this assessment, you are required to perform all 7 steps of software development. In addition, you are
also required to record a script session. See Requirements on page 3 for more information.
Problem Description
You have been employed to write a program, titled marksCalculator.py, which calculates student’s
marks for a subject at the university. There are 3 assessments in the subject: an assignment, an
assessable tutorial and an exam. The weightings of the assessments are as follows:
Exam 70%
Assignment 20%
Assessable Tutorial 10%
The assignment mark, assessable tutorial mark and exam mark must be entered for each student. The
assignment is marked out of 100, the assessable tutorial is marked out of 10 and the exam is marked out of
150. The result is to be the student’s component mark (the final grade for the subject). As there are many
students in a subject, the program should be able to process any number of students until the teacher tells
the program to stop.CSE1PE Assessable Tutorial B Page 2 of 4
Example Program Run
The following execution defines the program’s behaviour:
Welcome to the Marks Calculator!
Enter Student ID >> 12345678
Enter Assessable Tutorial mark (/10) >> 7
Enter Assignment mark (/100) >> 56
Enter Exam mark (/150) >> 93
Student ID: 12345678 Final Mark: 62%
Would you like to process another student’s marks? (y/n) >> y
Enter Student ID >> 23456789
Enter Assessable Tutorial mark (/10) >> 5
Enter Assignment mark (/100) >> 50
Enter Exam mark (/150) >> 75
Student ID: 12345678 Final Mark: 50%
Would you like to process another student’s marks? (y/n) >> n
You have processed the following students:
Student ID Final Mark (%)
123456789 62
23456789 50
Program has terminated, goodbye!CSE1PE Assessable Tutorial B Page 3 of 4
Program Development Tips
(1) During your calculations, you should use float data types, however the final mark should be an
int (whole number).
Example: a calculated final mark of 59.3% should be reported as 59%, while a mark of
62.7% should be reported as 63%.
(2) The program also needs to remember each student ID and corresponding final mark as the
continuous data processing occurs.
Example: the program has processed its first student, however the teacher wants to process
another 200 students. Until the teacher says she doesn’t want to continue, all processed
student ID’s and final marks must be stored, so they can be displayed at the end.
Requirements
Your document should be presented neatly. This includes the consistent use of a font, font size, page
numbering etc.
Keep in mind this assessment is marked out of 100. 10 of those marks are based on overall assessment
presentation.
YOUR DOCUMENT MUST CONTAIN THE FOLLOWING:
A title page with:
• Your name
• Your student ID
• The submission title (Assessable Tutorial B)
• Your tutor’s name
The 7 Steps in Software Development:
(1) Define the Problem
a. A clear representation of the problem in your own words
b. The use of informal diagrams to represent your definition may be beneficial
(2) Specify a High-Level Solution
a. Use of a Defining Diagram
(3) Outline the Solution
a. Describe how you intend on coming to the solution or solving the problem
b. One major element to include here is not only the calculation of the marks, but the way to
store values for later
(4) Develop the Algorithm
a. Use of a Data Dictionary
b. Use of a Pseudocode
(5) Test the Algorithm for correctness
a. Desk Check is required here
b. Please provide a Desk Check for 2 runs
(6) Code the Solution in Python
a. Copy your code from your code editor into the document
b. Include brief comments for the marker to understand the code
(7) Test the Solution
a. A Test Plan is required here
b. Do not fix the code if you get unexpected outputs
Script/Photo Session:
This will show the results obtained from your program. When running this session, please use your Test
Plan cases. Appendix 2 (below) demonstrates how to perform a script session.CSE1PE Assessable Tutorial B Page 4 of 4
Appendix 1: Marking Scheme
Item Number Task Mark Max Mark
1 Title Page /5
2 Define the Problem /5
3 Defining Diagram /5
4 Outline the Solution /5
5a Pseudocode /15
5b Data Dictionary /5
6 Desk Checking /15
7 Python Code /20
8 Test Plan /15
9 Script Sessions /5
10 Overall assignment presentation /5
Total: /100
Appendix 2: Recording a Script/Photo Session
Script Sessions are used to record Unix shell activity such as running & compiling programs, testing inputs
etc.
To start a Script Session in Unix:
1> script
Once script has been typed & entered, every action either by the user or the shell is now recorded
Example:
2> python3 name.py
Enter your name >> Lachlan
Your name is Lachlan
To end a Script Session:
3> exit
Whatever happened between the user typing script and exit has now been recorded to
typescript.txt which will be in the same directory your .py file is located.
Considering we ran a program which asked for user input, the text file should contain:
python3 name.py
Enter your name >> Lachlan
Your name is Lachlan