s = '''Python was started in 1989 by "Guido".\nPython is free and easy to learn.'''
print s
print s
2020-03-15
被自家python2.7的 SyntaxError: invalid syntax 差点搞到崩溃,还好最后解决这个问题了,不然下一节都学不了
2020-03-14
可以通过
sum = 0
x = 1
while x <= 100:
if (x % 2 != 0):
sum += x
x += 1
print(sum)
sum = 0
x = 1
while x <= 100:
if (x % 2 != 0):
sum += x
x += 1
print(sum)
2020-03-13
d = { 'Adam': 95, 'Lisa': 85, 'Bart': 59, 'Paul': 74 }
L = d.values()
print (L)
sum = 0.0
for i in L:
sum += i
print (sum / len(L))
L = d.values()
print (L)
sum = 0.0
for i in L:
sum += i
print (sum / len(L))
2020-03-10
s = set([('Adam', 95), ('Lisa', 85), ('Bart', 59)])
for x in s:
a=x[0]
b=x[1]
print a,':',b
for x in s:
a=x[0]
b=x[1]
print a,':',b
2020-03-08
s = "Python was started in 1989 by\"Guido\".\n Python is free and easy to learn."
print s
print s
2020-03-07
print"hello,python"
print"hello,"+"python"
print"hello,"+"python"
2020-03-07