简单小程序的实现:
1 for i in range(1,10):2 for j in range(1,i+1):3 print(‘%d*%d=%d‘%(j,i,j*i),end=‘t‘)4 print()
def login(username,password): if (username==‘alex‘ and password==‘123‘): print(‘用户名密码正确,登录成功‘) else: print(‘请输入正确的用户名和密码‘) username = input(‘input you username:‘)password = input(‘input your password:‘)login(username,password)