Week4 Revision
前言
我尽可能做详细,每个步骤讲清楚。答案不止一种,有大神可以留言。其他的课程课件简介请看我的主页。
Week4的revision,对于编程小白的我来说有点小挑战。可能你看的时候有的题没有讲,小编没有太大把握能讲明白,在后期会慢慢补上。
Zig Zag(待更新讲解)
Write a program which continually accepts user input. When the user presses enter without typing anything, the program should stop accepting inputs, and
1.Print out the 1st, 3rd, 5th, 7th, … things which where entered, then
2.Print out the 2nd, 4th, 6th, … things which where entered
Examples:
![在这里插入图片描述](https://img-blog.csdnimg.cn/2020092618341123.png?x-oss-process=image/watermark,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mzc3MzIyOA==,size_16,color_FFFFFF,t_70#pic_center
Hint* You can create an empty list (a list containing 0 elements) like so:
empty_list = []
要求:【暂无】
list=[]
zig=input()
while zig !='':
list.append(zig)
zig=input()
i=