Python if while continue break语句

岁酱吖の 提交于 2019-11-29 02:42:32

五:执行一个操作

        提醒用户输入用户名和密码

        获取用户名和密码,检测用户名 name ,密码 root

  

 input 输入 input(“>>>”) 字符型

           int(input(“>>>”)) 转换为数字

 

  1. if 条件 :

   Print(“ok”)

   eles :

   Print(“Error”)

  1. if 支持嵌套
  2. if elif

If....

elif ..... :

elif ..... :

elif ..... :

else.... :

 4 .pass

If 1==1:

  Pass

Else:

  Print(“hello”)

 

While 循环

Continue 结束当前循环

break  结束整个循环

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!