d['Alice'] = [50, 61, 66]
d['Bob'] = [80, 61, 66]
d['Candy'] = [88, 75, 90]
d['Bob'] = [80, 61, 66]
d['Candy'] = [88, 75, 90]
2021-04-20
d = {'Alice': [50, 61, 66], 'Bob': [80, 61, 66], 'Candy': [88, 75, 90]}
print (len(d))
print (len(d))
2021-04-18
L = ['Alice', 66, 'Bob', True, 'False', 100]
i = 0
while i < len(L):
if i % 2 != 0:
print (L[i])
i = i + 1
i = 0
while i < len(L):
if i % 2 != 0:
print (L[i])
i = i + 1
2021-04-18
subject = ['Chinese', 'Math', 'English']
score = ['92', '75', '99']
i = 0
while i < 3:
print (subject[i], score[i])
i+=1
score = ['92', '75', '99']
i = 0
while i < 3:
print (subject[i], score[i])
i+=1
2021-04-18
sum=0
i=0
while i<=1000:
if i % 2==0:
sum+=i
i+=2
else:
continue
print (sum)
i=0
while i<=1000:
if i % 2==0:
sum+=i
i+=2
else:
continue
print (sum)
2021-04-18
sum = 0
i = 0
while True:
if i <= 1000:
sum += i
i += 2
else:
break
print (sum)
i = 0
while True:
if i <= 1000:
sum += i
i += 2
else:
break
print (sum)
2021-04-18
L = [[1, 2, 3], [5, 3, 2], [7, 3, 2]]
a,b,c=L
for x in a:
for y in b:
for z in c:
print (2*y*z+x*2*z+x*y*2)
b.pop(0)
c.pop(0)
break
break
a,b,c=L
for x in a:
for y in b:
for z in c:
print (2*y*z+x*2*z+x*y*2)
b.pop(0)
c.pop(0)
break
break
2021-04-16
name=['Alice', 'Bob', 'Candy', 'David', 'Ellena']
name.append('Phoebe')
name.append('Zero')
name.insert(5,'Gen')
print(name)
name.append('Phoebe')
name.append('Zero')
name.insert(5,'Gen')
print(name)
2021-04-16