Answer to Question #228146 in Python for Shanta

Question #228146

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


  • 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-23T01:18:13-0400
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")

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
APPROVED BY CLIENTS