Python学习笔记W1

Posted on 2018-12-22 19:07  开往春天的火车  阅读(94)  评论(0)    收藏  举报

 

 

今天正式开始学习Python语言,学习方式观看教学视频,完成作业。视频共计28周,争取每天2天完成一周教学内容,共计56天,预计完成日期:2019-2-28.     Owen写于2018-12-22

哎,豪言壮语和计划总是落空!2021-3-5补记。

 

1. Python 之 if else 判断

_username = 'owen'

_password = 'abc123'

 

username = input ('please input username:')

password = input ('please input password:')

 

if username == _username and password==_password :

   print ('You input the correct username and password')

else :

   print ('You input the wrong username and password')

 

2. Python 之 while and for 循环

 

i = 0

for i in range(10):

print ('---------------------------------------------')
if i < 5 :
print(i)

 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3