Kiểm tra ngưỡng điểm từng kỹ năng của chứng chỉ B2 Aptis bằng Python
Một số chứng chỉ ngoại ngữ không chỉ xét tổng điểm mà còn đòi hỏi từng kỹ năng đạt một ngưỡng tối thiểu. Với B2 Aptis ESOL, thông tin trên trang khóa ôn nêu mỗi kỹ năng thang 0–50, tổng tối đa 200, và để đạt B2 thí sinh thường cần khoảng 35–42 điểm ở mỗi kỹ năng, không kỹ năng nào dưới 35. Bài này viết một hàm Python nhỏ để kiểm tra điều kiện đó. Mã đã chạy thử trên Python 3.12. Các con số chỉ…
This Python script evaluates whether a candidate has achieved the B2 level of the Aptis ESOL language certification, which requires each skill to meet a minimum threshold. The script is written in Python 3.12 and uses the Aptis score guidelines from an online practice test. The target scores for each skill (Listening, Reading, Writing, Speaking) range from 35 to 50, with a total score between 140 and 165 points.
If the total score falls outside this range, it is noted for the user to check again. The script raises a ValueError if the input lacks any of the four required skills or if any skill score falls outside the 0-50 range. The main functions are kiem_tra_diem, which validates the input data, and danh_gia_b2, which assesses whether the B2 certification is achieved based on the given scores.
The script includes a main block that tests the evaluation function with sample data and handles exceptions for invalid input.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.