Skip to content

Commit 7bb4b75

Browse files
leruyisrvz
authored andcommitted
1901100102第16期训练营day4 (#6203)
* 190100102 day1 * 191100102自学训练营16期day2 * 1901100102自学训练营第16期day2 * 1901100102 自学训练营16期day2 * Delete 1001SO2E01_hello_python.py.txt * 1901100102自学训练营16期作业day 3 * 1901100102自学训练营16期day 3 * 1901100102自学训练营第16期day 4
1 parent 5fa0eb3 commit 7bb4b75

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

1001S2E04_control_flow.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
print('打印九九乘法表')
3+
for i in range(1,10):
4+
# print('第%d行' % i, end='\t')
5+
for j in range(1, i + 1):
6+
print(i, '*', j, '=', i * j, end='\t')
7+
#print('{} * {} = {}'.format(i, j, i * j), end='\t')
8+
print()
9+
10+
print('\n打印跳过偶数行的九九乘法表')
11+
i = 1
12+
while i < 10:
13+
if i % 2== 0:
14+
print()
15+
else:
16+
for j in range(1, i + 1):
17+
print(i, '*', j, '=', i * j, end='\t')
18+
# print('{} * {} = {}'.format(i, j, i * j), end='\t')
19+
i += 1

0 commit comments

Comments
 (0)