Docsity

Python GPA Calculator, Exams of Religious studies

Toggle sidebar
bg1
ASSIGNMENT 1 BRIEF
Qualification BTEC Level 5 HND Diploma in Business
Unit number Computing Fundamental
Assignment title Problem solving with Python
Academic Year
Unit Tutor
Issue date Submission date
IV name and date
Submission Format:
Format: The submission is in the form of an individual written report and a demonstration of how your code
works. This should be written in a concise, formal business style using single spacing and font size 12.
You are required to make use of headings, paragraphs and subsections as appropriate, and all work
must be supported with research and referenced using the Harvard referencing system. Please also
provide a bibliography using the Harvard referencing system.
Submission: Students are compulsory to submit the assignment in due date and in a way requested by the Tutors.
The form of submission will be a soft copy in PDF posted on corresponding course of
http://cms.btec.edu.vn/
Note: The Assignment must be your own work, and not copied by or from another student or from
books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must
reference your sources, using the Harvard style. Make sure that you know how to reference properly, and that
understand the guidelines on plagiarism. If you do not, you definitely get fail
Assignment Brief and Guidance:
Scenario: You are a student who wants to calculate your GPA (grade point average) based on your grades in
different courses. You decide to write a Python program that can do this task for you. Your program should:
Define a function to calculate the GPA given a list of grades and their corresponding credits. The formula for GPA is
the sum of the products of each grade and its credit divided by the total credits.
Requirements
The GPA calculator program must meet the following requirements:
It must be able to store the student's name and grades in a list.
It must be able to calculate the GPA using a function.
It must be able to handle errors and invalid input.
It must be able to print the results to a text file.
In order to do this, you can use the following steps:
Page 1
pf3

Partial preview of the text

Download Python GPA Calculator and more Exams Religious studies in PDF only on Docsity!

ASSIGNMENT 1 BRIEF

Qualification BTEC Level 5 HND Diploma in Business

Unit number Computing Fundamental

Assignment title Problem solving with Python

Academic Year

Unit Tutor

Issue date Submission date

IV name and date

Submission Format:

Format: The submission is in the form of an individual written report and a demonstration of how your code

works. This should be written in a concise, formal business style using single spacing and font size 12.

You are required to make use of headings, paragraphs and subsections as appropriate, and all work

must be supported with research and referenced using the Harvard referencing system. Please also

provide a bibliography using the Harvard referencing system.

Submission: Students are compulsory to submit the assignment in due date and in a way requested by the Tutors.

The form of submission will be a soft copy in PDF posted on corresponding course of

http://cms.btec.edu.vn/

Note: The Assignment must be your own work, and not copied by or from another student or from

books etc. If you use ideas, quotes or data (such as diagrams) from books, journals or other sources, you must

reference your sources, using the Harvard style. Make sure that you know how to reference properly, and that

understand the guidelines on plagiarism. If you do not, you definitely get fail

Assignment Brief and Guidance:

Scenario : You are a student who wants to calculate your GPA (grade point average) based on your grades in

different courses. You decide to write a Python program that can do this task for you. Your program should:

Define a function to calculate the GPA given a list of grades and their corresponding credits. The formula for GPA is

the sum of the products of each grade and its credit divided by the total credits.

Requirements

 The GPA calculator program must meet the following requirements:

 It must be able to store the student's name and grades in a list.

 It must be able to calculate the GPA using a function.

 It must be able to handle errors and invalid input.

 It must be able to print the results to a text file.

In order to do this, you can use the following steps:

 Create a calculate_gpa() function to calculate GPA. This function will take a list of component scores as input

and return the GPA score.

 Use list to store the list of component scores and credits.

 Create a print_gpa() function to print the GPA.

 Prompt the user to enter course grade and corresponding credits.

 Handle error cases, invalid input cases. For example, if the user enters an invalid name, the program will print

an error message.

 Print the results to a text file.

Tasks

P1 : Provide a definition of the data type that you use for the variables. (Lý thuyết chung về biến và kiểu dữ liệu)

 Identify the variables used in the program.

 Specify the data type for each variable.

 Briefly explain the reason for choosing the selected data type.

P2 : Explain the error handling process. (Giải thích về quá trình bắt lỗi trong Python)

 Describe the types of errors that the program might encounter.

 Outline the steps involved in handling errors using a try-except block.

P3 : Determine the steps taken from writing code to execution. (Giải thích mã nguồn chương trình tính điểm GPA)

 List the steps involved in writing and executing the program.

 Briefly explain the purpose of each step.

 Identify the tools and resources used for writing and executing the program.

Learning Outcomes and Assessment Criteria

Mark = 5 (all pass criteria) 5<Mark<8 Mark>=

LO1 Understand Fundamental Programming Concepts D1 : Evaluate the impact of different

data types on the performance and

memory usage of the program.

D2 : Evaluate the use of try-except-

finally blocks and custom exceptions

to handle errors and provide

meaningful feedback to the user.

P1 Provide a definition of the

data type that you use for the

variables.

P2 Explain the error handling

process.

M1 Compare the advantage and

disadvantage of variables type

M2 Examine how the debugging

process can be used to help develop

more secure, robust applications.

LO2 Utilize Python for Basic Problem Solving D 3 Evaluate the role and purpose of

a coding standard and why it is

necessary in a team as well as for the P3 Determine the steps taken M3 Analyse the process of writing