python基础

  • input:永久等待,直到用户输入内容给变量赋值才会继续执行

inp = input('>>>')

input接收的都是字符串类型

inp * 3 = >>>>>>>>>

#如果将字符串转换成数字   new_inp = int(inp)

inp * 3 = 30

  • print('')
  • 变量名(由字母数字下划线组成)

要求:不能用数字开头

   不能使用关键字

   建议不要用python内置的东西

  • 条件语句 

基本

嵌套

if else elif

  • while循环

while 条件:

  if

a.while else

while :

else:

b.continue 终止当前循环

 c,break终止所有循环

 

 

posted @ 2018-09-20 10:29  Bo.Tall  阅读(199)  评论(0)    收藏  举报