2023年7月8日

python笔记1.2

摘要: 基本输入函数input的应用 name=input('请输入您的姓名') print('您的姓名为:'+name) num=int(input('请输入您的幸运数字')) #print('您的幸运数字为:'+num) #字符串和整数无法运算 print('您的幸运数字为:' ,num) #正常返回n 阅读全文

posted @ 2023-07-08 22:25 swowoy 阅读(4) 评论(0) 推荐(0) 编辑

python笔记1.1

摘要: ASCII码 使用print输出中文Unicode编码: print(ord("天")) #使用ord()查询“天”的Unicode编码为22825 print("\u5929") #22825的十六进制为5929返回值为“天” 使用print()将内容输出到文件 fp=open("note.txt 阅读全文

posted @ 2023-07-08 21:45 swowoy 阅读(3) 评论(0) 推荐(0) 编辑

导航