我是靠谱客的博主 儒雅雨,这篇文章主要介绍第三次作业,现在分享给大家,希望可以做个参考。

4-2

复制代码
1
2
3
4
5
6
animals=['dog','cat','cow'] for animal in animals: print(animal) print('A '+animal.title()+' would make a great pet.n') print('Any of these animals would make a great pet!n')

4-5

复制代码
1
2
3
4
5
6
7
array=[] for value in range(1,1000001): array.append(value) print(min(array)) print(max(array)) print(sum(array))

4-10

复制代码
1
2
3
4
5
6
7
8
array=['a','b','c','d','e'] print('The first three elements:') print(array[0:3]) print('Three elements from middle of the list:') print(array[1:4]) print('The last three elements of list:') print(array[-3:])

最后

以上就是儒雅雨最近收集整理的关于第三次作业的全部内容,更多相关第三次作业内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(63)

评论列表共有 0 条评论

立即
投稿
返回
顶部