''' 輸入語文、數學、英語成績。三門課都大於60分且有一門100分,或兩門90分優秀; 都大於60分且有一門90分以上,或兩門80分良好;三門60分以上為合格; 有一門60分以下為不合格。 ''' chinese_score = int(input('語文成績:')) maths_score = int(input('數學成績:')) english_score = int(input('英語成績:')) lis = [chinese_score,maths_score,english_score] print(lis) i = 0 j = 0 k = 0 m = 0 n = 0 for score in lis: if score < 60: i += 1 if score == 100: j += 1 if score >= 90 and score <100: k += 1 if score >= 80 and score <90: m +=1 if score >= 60 and score <80: n +=1 print('i=',i,'j=',j,'k=',k,'m=',m,'n=',n) if i> 0: print('不合格') elif i== 0 and j > 0: print('優秀') elif i== 0 and k >= 2: print('優秀') elif i== 0 and k == 1: print('良好') elif i== 0 and m >= 2: print('良好') else: print('合格')