score = 85
if score >= 90:
print 'excellent'
elif score >= 80 and score < 90:
print 'good'
elif score >= 60 and score < 80:
print 'passed'
else:
print 'failed'
if score >= 90:
print 'excellent'
elif score >= 80 and score < 90:
print 'good'
elif score >= 60 and score < 80:
print 'passed'
else:
print 'failed'
2014-12-16
for x in range(0,10):
for y in range(0,10):
if x>0 and x < y:
print x*10+y
for y in range(0,10):
if x>0 and x < y:
print x*10+y
2014-12-16
正確的代碼應該是:
score = 85
if score >= 90:
print 'excellent'
elif score >=80 and score <90:
print 'good'
elif score >=60 and score<80:
print 'passed'
else:
print 'failed'
score = 85
if score >= 90:
print 'excellent'
elif score >=80 and score <90:
print 'good'
elif score >=60 and score<80:
print 'passed'
else:
print 'failed'
2014-12-15
x1 = 1
d = 3
n = 100
x100 = x1 + d * (n-1)
s = (x1 + x100) * n / 2
print s
還沒到函數呢,你們放這么早干嘛?
d = 3
n = 100
x100 = x1 + d * (n-1)
s = (x1 + x100) * n / 2
print s
還沒到函數呢,你們放這么早干嘛?
2014-12-15