摘要: #coding=utf-8 指定编码方式为utf-8 变量的定义以及使用 # conunt用来记录可乐的瓶数 count = 2 # price用来存储可乐的单价 price = 3 # money用来存储花费的总钱数 money = count * price print("应支付:{}元".fo 阅读全文
posted @ 2020-10-23 11:10 马铃薯1 阅读(65) 评论(0) 推荐(0) 编辑
摘要: 一、算术运算符 + 1>求和 2>正号 3>连接两个字符串 "a" + "b" = "ab" # "+"的用途 a = 10 b = +20 c = a + b print("%d + %d = %d"%(a,b,c)) # 10 + 20 = 30 str1 = "Hello" str2 = "W 阅读全文
posted @ 2020-10-23 10:41 马铃薯1 阅读(932) 评论(0) 推荐(0) 编辑