我觉得这个网特别好,我们那个年代根本没有这么好的东西。大家免费学习,要有感恩的心。计算机这东西说复杂还是很复杂的,细节问题和版本有很大关系。
2020-05-25
for x in range(0,10):
for y in range(0,10):
for z in range(0,10):
if z == x:
print(str(x)+str(y)+str(z))
for y in range(0,10):
for z in range(0,10):
if z == x:
print(str(x)+str(y)+str(z))
2020-05-25
最赞回答 / fengyunzhu
我也遇到了这个问题,网上找的答案因为python中print函数需要返回值,如果你在print函数中所放的函数没有返回值,那么print将会return None
2020-05-24
最新回答 / 慕UI1354896
sum = 0 x = 1 n = 1 while True: sum = sum + n n = n * 2 x = x + 1 if x > 20: break print(sum)这个是随意的,x当循环数也是可以的。
2020-05-24
s = '''Python was started in 1989 by "Guido".
Python is free and easy to learn.'''
print (s)
Python is free and easy to learn.'''
print (s)
2020-05-23
L = [75, 92, 59, 68]
sum = 0.0
for score in L:
sum+=score
print sum / 4
sum = 0.0
for score in L:
sum+=score
print sum / 4
2020-05-23
L = ['Adam', 'Lisa', 'Bart']
L.pop(2)
L.pop(0)
L.insert(0,'Bart')
L.append('Adam')
print L
复习一下前面几节....
L.pop(2)
L.pop(0)
L.insert(0,'Bart')
L.append('Adam')
print L
复习一下前面几节....
2020-05-23
s = set(['Adam', 'Lisa', 'Paul'])
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for l1 in L:
if l1 in s:
s.remove(l1)
else :
s.add(l1)
print s
L = ['Adam', 'Lisa', 'Bart', 'Paul']
for l1 in L:
if l1 in s:
s.remove(l1)
else :
s.add(l1)
print s
2020-05-22
# -*- coding: utf-8 -*-
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
x={}
for a, b in d.items():
a,b=b,a
x[a]=b
print(x)
for 循环写了个自动的
d = {
'Adam': 95,
'Lisa': 85,
'Bart': 59
}
x={}
for a, b in d.items():
a,b=b,a
x[a]=b
print(x)
for 循环写了个自动的
2020-05-22