diff --git a/pythonProject/test/8.py b/pythonProject/test/8.py new file mode 100644 index 0000000..c9a6c19 --- /dev/null +++ b/pythonProject/test/8.py @@ -0,0 +1,6 @@ +s=0 +i=0 +while i<=100: + s=s+i + i+=1 +print(s) \ No newline at end of file diff --git a/pythonProject/test/9.py b/pythonProject/test/9.py new file mode 100644 index 0000000..ffa3d77 --- /dev/null +++ b/pythonProject/test/9.py @@ -0,0 +1,11 @@ +# for i in 'chenxuan': +# print(i) + +# s=0 +# for i in range(1,101): +# s=s+i +# if i==100: +# print(s) +a=[1,2,3,4,5] +for i in a: + print(i,end=' xx ') \ No newline at end of file