Day 13 Python 一之helloworld
生活随笔
收集整理的這篇文章主要介紹了
Day 13 Python 一之helloworld
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
直接肝程序吧!
""" # 作業六:用戶登錄測試(三次機會)count = 1 while count <= 3:user = input('請輸入用戶名: ')password = input ('請輸入密碼: ')if user == 'dachao' and password == '123':print ('你真厲害!!!')breakelse:print ('再試一次呦!')count+=1 """""" # 作業四:輸出1-100內所有的偶數i = 1 while i <= 100:if i%2 == 0:print (i)i+=1 """ """ # 作業三:輸出1-100內的所有奇數i = 1 while i <= 100:if i%2 != 0:print (i)i+=1 """""" # 作業二:求1-100的所有數的和i = 1 sum = 0 while i <= 100:sum = sum + ii+=1 print (sum)"""""" # 作業一:while 循環輸出1 2 3 4 5 6 8 9 10 無7 !!!i = 1 while i <= 10:if i !=7:print (i)# i+=1# else:# i+=1# continuei+=1 """""" name = input ('請輸入用戶名: ') password = input ('請輸入密碼: ')if name == 'dachao' and password == '123':print ('user login successful') else:print ('user or code is wrong!')""" """ #通過tag的True賦值,實現用戶名和密碼必須為真進行下一步,否則無線循環的目的。 tag = True while tag :username = input ('input username: ')password = input ('input password: ')if username == 'dachao' and password == '123' :while tag :cmd = input ('>>: ')if cmd == 'q' :tag = Falsecontinueprint ('------->%s' %cmd)""" """ #九九乘法表 for i in range(1,10) :for j in range(1,i+1) :print ('%d*%d=%d' %(i,j,i*j),end = ' ')print () #每次執行語句自動占用一行,“/n”代表空一行 """""" name = input ('請輸入用戶名: ')if name == 'dachao' :print ('你最牛逼!') elif name == 'xiaochao' :print ('你可以的!') else:print ('你還需努力呢!')"""""" while True:print ('123')print ("456")continue""" """ import getpass password = getpass.getpass ('請輸入密碼: ') print (password) #自帶idle不支持隱藏回顯。""" Python入門?
轉載于:https://www.cnblogs.com/LiChaoAI/p/6952643.html
總結
以上是生活随笔為你收集整理的Day 13 Python 一之helloworld的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 福州津津有味包子有多少家
- 下一篇: java.lang.NoClassDef