Python学习第一天
来源:互联网 发布:汉字笔画笔顺软件 编辑:程序博客网 时间:2024/05/11 09:31
知识回顾:
一、变量
1、变量命名: 字母、下划线、数字组合,
规则: 数字不能作为开头、特殊字符不能作为变量名
2、变量赋值:
name = 'wuzx'
name1=name
name= 'wuzx1
print(name,name1)
最后结果: wuzx1,wuzx
变量赋值是指向内存中一区域值
二、字符编码与二进制
1、国家字符编码来源: 美国开发的基于电脑编码的255 位ASCII码值(8位表示一字节),为统一各国编码 ,而后又美国创建统一标准unicode编码(16位表示2字节)
unicode升级版UTF-8(可变长)所有英文字符存储为ASCII,存中文为三个字节,
ASCII--》unicode-》utf-8
中国汉字编码集: ASCII --》gb2312 --》gbk--》gb18030
三、用户交互程序 name=input(“name:”) input()方法,import getpass 引入密文函数
username =input("username:")
password=getpass.getpass("password:")
四、If ..else,while..break,for..break,for...continue
Age_wuzx=88
count=0
for I in range(100):
while count<3:
guess_age=input("guess_age:")
if guess_age==Age_wuzx:
print("goot, you get it.")
break
else:
print("you are false")
count+=1
guess_age=input("do you want countinue guess_age....?")
if guess_age=='N' or guess_age=='n':
print("OK ,EXIT")
break
else:
print("countinue again)
countinue
print("Test countinue function")
- 学习python第一天
- Python 学习第一天
- Python学习第一天
- Python学习第一天
- 学习python第一天
- Python学习-第一天
- python学习第一天
- 第一天学习python
- 学习python第一天
- python学习第一天
- Python学习第一天
- Python学习第一天
- Python学习第一天
- 第一天学习python
- python--学习第一天
- Python 学习 第一天
- 【学习Python】第一天
- python 学习第一天
- solr 搜索引擎搭建和使用 (一)
- 仙剑奇侠传
- Shell学习笔记(二)
- Redis在游戏开发中的应用
- Eclipse中Debug模式的使用
- Python学习第一天
- error "flag 'tab_complete_word' was defined more than once caffe
- 进程和线程的理解
- 创建React nativity HelloWorld Project
- codeforces 71A. Way Too Long Words
- [C++ 构造函数设置优先队列 和 限制优先队列]
- 7.0 CTS fail 项分析(二)
- c++修饰符类型
- C++ std::list实现大整数加法运算