number test

作者: LorryZ | 来源:发表于2017-05-17 06:37 被阅读3次

for value in range(1,21):

print(value)

list_value = list(range(1,1000000))

print(sum(list_value))

odd_number = list(range(1,21,2))

print(odd_number)

for odd in range(1,21,2):

print(odd)

for triple in range(3,30,3):

print(triple)

cubic = []

for value in range(1,11):

cubic.append(value**3)

print(cubic)

cubic_2 = [value**3 for value in range(1,11)]

print(cubic_2)

相关文章

网友评论

    本文标题:number test

    本文链接:https://www.haomeiwen.com/subject/pxwltxtx.html