Skip to content

Commit bf9dd8e

Browse files
authored
Merge pull request selfteaching#1903 from Autumn0808/master
Update d4_exercise_control_flow.py
2 parents 4f24d21 + ecd10c2 commit bf9dd8e

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)