#python day02 初识python 学习视频来源于 太白金星

#python day02 初识python 学习视频来源于 太白金星
''' 知识点:安装PyCharm'''
# 设置鼠标条件字体大小:file ->settings
# 搜索mouse Editor->general->Change font size(zoom)with Ctrl+Mouse wheel
# 快捷键ctrl+?:自动批量注释
''' 知识点:格式化输出'''
# name = 'QQ'
# age = 29
# height = 170
# msg ="""------info of %s------
# name :%s
# age : %d
# height: %d
# ------------------------""" %(name,name,age,height)
# print(msg)
''' 知识点:pass'''
# if True:
# pass
# else:
# print("777")
''' 知识点:while else'''
# count = 4
# while count <= 5 :
# count += 1
# if count == 3:break
# print("Loop",count)
#
# else:
# print("循环正常执行完啦")
# print("-----out of while loop ------")
''' 知识点:+= -= *= /= '''
# x = 3
# count += 1
# count += x
''' 知识点:编码ascii,utf-8,gbk '''
# ascii 只能表示256种可能,太少,
# Unicode utf-8 utf-16 utf-32
# 8位 = 1字节bytes
# utf-8 一个字符最少用8位去表示,英文用8位 一个字节
# 欧洲文字用16位去表示 两个字节
# 中文用24 位去表示 三个字节
# utf-16 一个字符最少用16位去表示
# gbk 中国人自己发明的,一个中文用两个字节 16位去表示。
''' 知识点:逻辑运算 '''
# bool 非零转换成bool True 0 转换成bool 是False
# bool()
# 优先级,()> not > and > or
# x or y x True,则返回x
# x and y x True,则返回y
# print(not 2 > 1 and 3 < 4 or 4 > 5 and 2 > 1 and 9 > 8 or 7 < 6) # F
# print(1 > 2 and 3 or 4 and 3 < 2) # F
# print(2 or 1 < 3 and 2) # 2

猜你喜欢

转载自www.cnblogs.com/ham-731/p/10359228.html