Skip to content

Commit ecd10c2

Browse files
committed
Update d4_exercise_control_flow.py
1 parent e438647 commit ecd10c2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

19100402/Autumn0808/d4_exercise_control_flow.py

+12
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,15 @@
2121
else:
2222
print(str(x)+"*"+str(y)+"="+str(x*y),end="\t")
2323

24+
#作业2使用while循环
25+
m = 1
26+
while m <= 9:
27+
n = 1
28+
while n <= m:
29+
print(str(m)+"*"+str(n)+"="+str(m*n),end="\t")
30+
n = n + 1
31+
m = m + 2
32+
33+
34+
35+

0 commit comments

Comments
 (0)