初识python 视频_#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

标签:count,知识点,utf,16,python,day02,初识,print,位去

来源: https://www.cnblogs.com/ham-731/p/10359228.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值