摘要: 1 sentence1 = 'tom\'s pet is a cat' # 单引号中包含转单引号 2 sentence2 = "tom\'s pet is a cat" 3 sentence3 = "tom said:\"hello world\"" 4 sentence4 = 'tom said: 阅读全文
posted @ 2022-11-14 23:16 usolo 阅读(16) 评论(0) 推荐(0) 编辑
摘要: 1 uname=input("please input username:") 2 print("welcome",uname) #print各项间默认以空格作为分隔符 3 print("welcome "+uname) #注意引号内最后的空格 学习资源来自:张志刚老师python百例 《例解Pyt 阅读全文
posted @ 2022-11-11 14:21 usolo 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 1 num = input("请输入数字:") # input用于录入键盘输入 2 print(num) 3 print(type(num)) #input获取到数据类型是字符类型 4 5 print(num+10) #报错,不能把字符和数字作运算 6 print(int(num)+10) #int 阅读全文
posted @ 2022-11-11 09:44 usolo 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 1 print(5 / 2) # 2.5 2 print(5 // 3) #1 取整除 3 print(5 % 3) #2 取余数(取模) 4 print(5 ** 2) #25 5的2次方 5 print(5 > 3) #True 6 print(3 > 5) #False 7 print(20 阅读全文
posted @ 2022-11-10 14:27 usolo 阅读(12) 评论(0) 推荐(0) 编辑
摘要: 1 print('hello world!') 2 print('hello','world!') #逗号自动添加默认的分隔符:空格 3 print('hello'+'world!') #加号表示字符拼接 4 print('hello','world',sep='***') #单词间用***分隔 5 阅读全文
posted @ 2022-11-10 08:46 usolo 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 1 print('hello world!') 2 if 2 > 0: 3 print('ok') 4 print('yes') 5 6 x = 3; y = 4 7 print(x + y) 学习资源来自:张志刚老师python百例 《例解Python:Python编程快速入门践行指南 张志刚 电 阅读全文
posted @ 2022-11-09 22:41 usolo 阅读(14) 评论(0) 推荐(0) 编辑
摘要: .net core 3.1项目运行在Windows server 2012R2服务器上,Decimal类型小数点不见了,求解! string str = "1002910.8241"; Console.WriteLine( Convert.ToDecimal(str)); 打印出 100291082 阅读全文
posted @ 2020-12-30 15:46 usolo 阅读(130) 评论(3) 推荐(0) 编辑
摘要: 消息通信组件Net分布式系统的核心中间件之一,应用与系统高并发,各个组件之间解耦的依赖的场景。本框架采用消息队列中间件主要应用于两方面:一是解决部分高并发的业务处理;二是通过消息队列传输系统日志。目前业界使用较多的消息队列组件有RabbitMQ、ActiveMQ、MSMQ、kafka、zeroMQ等 阅读全文
posted @ 2017-06-03 13:41 usolo 阅读(205) 评论(1) 推荐(1) 编辑