1 Star 0 Fork 0

Shero / 第一周作业

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
Clone or download
1_for.py 767 Bytes
Copy Edit Web IDE Raw Blame History
Shero authored 2018-10-15 16:34 . Upload 1_while.py 1_for.py
#左下九九乘法表
for x1 in range(1,10):
for y1 in range(1,x1+1):
print('{}*{}={}\t'.format(y1,x1,x1*y1),end=(''))
print()
print("="*70)
#左上九九乘法表
for x2 in range(1,10):
for y2 in range(1,10-x2+1):
print('{}*{}={}\t'.format(y2,10-x2,y2*(10-x2)),end=(''))
print()
print("="*70)
#右下九九乘法表
for x3 in range(1,10):
for k in range(1,10-x3):
print(end=(' '))
for y3 in range(1,x3+1):
print('{}*{}={}\t'.format(x3+1-y3,x3,(x3+1-y3)*x3),end=(''))
print()
print("="*70)
#右上九九乘法表
for x4 in range(1,10):
for k in range(1,x4):
print(end=(' '))
for y4 in range(1,11-x4):
print('{}*{}={}\t'.format((11-x4-y4),10-x4,(11-x4-y4)*(10-x4),),end=(''))
print()
print("="*70)

Comment ( 0 )

Sign in for post a comment

Python
1
https://gitee.com/Chan_Shero/first_week_assignment.git
git@gitee.com:Chan_Shero/first_week_assignment.git
Chan_Shero
first_week_assignment
第一周作业
master

Search