CLB Calculator
# Function to convert IELTS score to CLB level for each section
def ielts_to_clb(score, section):
if section == "listening":
if score >= 8.5:
return 10
elif score == 8.0:
return 9
elif score == 7.5:
return 8
elif score == 6.0 or score == 6.5 or score == 7.0:
return 7
elif score == 5.5:
return 6
elif score == 5.0:
return 5
elif score == 4.5:
return 4
else:
return "Below CLB 4"
elif section == "reading":
if score >= 8.0:
return 10
elif score == 7.5:
return 9
elif score == 7.0:
return 8
elif score == 6.0 or score == 6.5:
return 7
elif score == 5.5:
return 6
elif score == 5.0:
return 5
elif score == 4.5:
return 4
else:
return "Below CLB 4"
elif section == "writing" or section == "speaking":
if score >= 7.5:
return 10
elif score == 7.0:
return 9
elif score == 6.5:
return 8
elif score == 6.0:
return 7
elif score == 5.5:
return 6
elif score == 5.0:
return 5
elif score == 4.0 or score == 4.5:
return 4
else:
return "Below CLB 4"
# Function to calculate total CLB scores for all sections
def calculate_clb_score(listening_score, reading_score, writing_score, speaking_score):
clb_listening = ielts_to_clb(listening_score, "listening")
clb_reading = ielts_to_clb(reading_score, "reading")
clb_writing = ielts_to_clb(writing_score, "writing")
clb_speaking = ielts_to_clb(speaking_score, "speaking")
return {
"CLB Listening": clb_listening,
"CLB Reading": clb_reading,
"CLB Writing": clb_writing,
"CLB Speaking": clb_speaking
}
# Example Usage
listening_score = 7.5
reading_score = 6.5
writing_score = 6.0
speaking_score = 6.5
clb_scores = calculate_clb_score(listening_score, reading_score, writing_score, speaking_score)
print(f"CLB Scores: {clb_scores}")
0 Comments
If you have any doubts please let me know.