Discuss / Python / 打卡练习:5

打卡练习:5

Topic source

CityeBox

#1 Created at ... [Delete] [Delete and Lock User]

sum = 0

L = ['Bart', 'Lisa', 'Adam']

# for 循环

for x in range(101):

sum += x

print(sum)

for x in L:

print('hello,' + x)

# while 循环

len = len(L)

i = 0

while i < len:

print('hello,' + L[i])

i = i + 1


  • 1

Reply