Answer to Question #228442 in Python for lab

Question #228442

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.)


IELTS Score -CEFR Level

8.5-9 C2

7-8 C1

5.5-6.5 B2

4.5-5 B1

4 A2

0- below 4 A1

  • Note: If the user gives a score that is above 9 or below 0, you should print “Invalid score”.

Example 1:

Sample Input:

IELTS Score: 6

Sample Output:

CEFR Level: B2





1
Expert's answer
2021-08-22T07:15:38-0400
score = int(input("IELTS Score: "))


if score>=8.5 and score<=9:
    print("CEFR Level: C2")
elif score>=7 and score<=8:
    print("CEFR Level: C1")
elif score>=5.5 and score<=6.5:
    print("CEFR Level: B2")
elif score>=4.5 and score<=5:
    print("CEFR Level: B1")
elif score==4:
    print("CEFR Level: A2")
elif score>=0 and score<4:
    print("CEFR Level: A1")
elif score<0 or score>9:
    print("Invalid score")





Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS