Write a Python code of a program that reads a candidate’s ielts score and prints out the corresponding CEFR level for that band score. The score ranges and corresponding CEFR level are shown in the table below.
(Hint: This problem can be solved in two ways: top-down and bottom-up.)
Example 1:
Sample Input:
IELTS Score: 6
Sample Output:
CEFR Level: B2
score = float(input("IELTS Score: "))
returning = "CEFR Level: "
if score>=2 and score <3:
print (returning + "A1")
elif score>=3 and score <3.5:
print (returning + "A2")
elif score>=3.5 and score <5.5:
print (returning + "B1")
elif score>=5.5 and score <7.0:
print (returning + "B2")
elif score>=7.0 and score <8.0:
print (returning + "C1")
elif score>=8.0 and score <9.0:
print (returning + "C1")
elif score>=9 or score <=0 or (score>0 and score<2):
print ("Invalid score")
Comments
Leave a comment