python-变量、if else语句 、for循环、while循环(4月26号)
变量: 五.注意:python是可执行程序 在linux写python第一行必须写#!/usr/bin/env python(声明解释器在windows中写python第一行需要写# -*- coding:utf-8 -*- Pycharm:开发调试效率高 在pycharm中new project 并且每天创建一个目录右键diectory命名为day1 (1).在day1中创建一个程序 右键new python file命名为var 注意如果想在python中想要有模板 可以在view中点击toolbar点击小工具选项editor选择file and code templates选择python scpipt写上自己想要的模板 点击apply选择ok (2)可以输出hello 运行 六.变量var定义规则:变量名只能是字母、数字或下划线的任意组合 变量名的第一个字符不能是数字 以下关键字不能声明为变量明 注释单行#注释多行‘’‘。。。’‘’ 七.用户输入 # 用户输入三种格式 第一种输入方法 #username = input('username:') #username = input('password:') #print(username,password) #用户输入格式 第二种输入方法 #n1ame = input('name:') #age = input ('age: