#!/usr/bin/env python
#coding:utf-8
"""
file:user.py
date:8/24/17
author:hu
desc:
"""
count = 0
for i in range (3):
username=raw_input("please enter username:")
password=raw_input("please enter userpassword:")
if username=="root" and password=="westos":
print ("login ok")
break
if username!="root":
print ("user is not exist")
if password!="westos":
print ("password is no ok")
count +=1
if count == 3:
print ("count is bigger than 3")
乘法表
#!/usr/bin/env python
#coding:utf-8
"""
file: chengfa.py
date: 8/24/17
author:hu
desc:
"""
for i in range(1,10):
for j in range(1,i+1):
i*j
print i,'*',j,'=',i*j,'\t'
思维脑图