Assignment 1 Frontsheet
Assignment 1 Frontsheet
Student declaration
I certify that the assignment submission is entirely my own work and I fully understand the consequences of plagiarism. I understand that
making a false declaration is a form of malpractice.
Grading grid
P1 P2 P3 M1 M2 M3 D1 D2 D3
❒ Summative Feedback: ❒ Resubmission Feedback:
1.3. Briefly explain the reason for choosing the selected data type.
Giải thích lý do lựa chọn các kiểu dữ liệu trong chương trình.
2.1. Describe the types of errors that the program might encounter.
Mô tả về các loại lỗi cần xử lý trong chương trình Python
3.1. List the steps involved in writing and executing the program.
Đưa ra quy trình từng bước xử lý bài toán
Giải thích từng bước thực hiện chương trình.
Giải thích cả về mã nguồn
Create a calculate_gpa() function to calculate GPA. This function will take a list of component scores as input
and return the GPA score. – Hàm tính toán giá trị gpa . Đầu vào là list object bao gồm (Điểm , Tín chỉ )
- Trình bày về Tuple trong Python và cách sử dụng, cách duyệt list
Create a print_gpa() function to print the GPA.
- Viết hàm print_gap để in giá trị dữ liệu
Prompt the user to enter course grade and corresponding credits.
- Hàm nhập thông tin điểm + tín chỉ
Handle error cases, invalid input cases. For example, if the user enters an invalid name, the program will print
an error message.
- Xử lý lỗi ngoại lệ try exception trong Python
Print the results to a text file.
- Xử lý việc lưu vào file
3.2. Briefly explain the purpose of each step.
3.3. Identify the tools and resources used for writing and executing
the program.
Xác định cộng cụ, tài nguyên sử dụng viết và thực hiện chương trình
Giới thiệu về Pycharm / Visual Studio Code
Hướng dẫn cách sử dụng Pycharm / Visual Studio Code (Viết mã nguồn, thực thi chạy chương
trình)
Conclusion