Python重新学习第一天

Python种类:

    JavaPython

    cPython        ******

    pypy   (速度最快,但暂非主流)

Python程序:

1.终端、解释器

2.文件形

3.编码:

# -*- coding: utf-8 -*-

  unicode  万国码

账号密码验证(最多三次):

# -*- coding:utf 8 -*-
print('Enter your username and passwd')
user = input('>>>')
passwd = input('>>>')
count = 1
while count < 3:
if user == 'alex' and passwd == '123456':
print('correct')
break
else:
print('uncorrect, enter again')
print('username')
user = input('>>>')
print('passwd')
passwd = input('>>>')
count = count + 1

if count == 3:
print('sorry, your account has been locked')