我覺得我輸入的也沒錯啊
score = 85?
?if score>=90: ? ?print 'excellent'
?elif 90>score>=80: ? ?print 'good'
?elif 80>score>=60: ? ?print 'passed'?
else: ? ?print 'failed'?
?為什么我這個就說我不對呢。。。
score = 85?
?if score>=90: ? ?print 'excellent'
?elif 90>score>=80: ? ?print 'good'
?elif 80>score>=60: ? ?print 'passed'?
else: ? ?print 'failed'?
?為什么我這個就說我不對呢。。。
2018-01-17
舉報
2018-10-30
是這樣子的
score = 85?
?if score>=90: ? ?print 'excellent'
?elif 90>score and score >=80: ? ?print 'good'
?elif 80>score? ?and score >=60: ? ?print 'passed'?
else: ? ?print 'failed'?
其實不用給那個區域的上限的,沒必要的
2018-04-08
其實if條件不滿足就說明score小于90了沒必要在下一個條件標注小于90了,其他同理,其實你這樣寫也是對的,只是這個慕課網這個在線編輯平臺默認正確的方式是那個不冗余的寫法!希望可以采納……謝謝!
if
?score?>
=
?90
:
????
print
?'excellent'
elif
?score?>
=
?80
:
????
print
?'good'
2018-03-19
2018-02-21
最后一個else的縮進格式不對,
elif 90>score>=80:
elif 80>score>=60: 這種寫法也不要使用
2018-02-04
最后一個else的縮進有問題
2018-01-31
90>score>=80, 80>score>=60在程序中不能直接用
2018-01-17
縮進不對
判斷后,換行+縮進4個空格