摘要:
#1-2+3-4+5.....+99=? count = 1 sum = 0 while count < 100: if count % 2 == 1: sum = sum + count else: sum = sum - count count += 1 print(sum) View Code 阅读全文
posted @ 2021-05-08 18:05
索命菩萨
阅读(30)
评论(0)
推荐(0)
摘要:
数字:int 12,3,45 + - * / ** % 取余数 ps:type() 字符串转化成数字:int(str) 条件:str必须是数字组成的。 数字转化成字符串:str(int)字符串:str,python当中凡是用引号引起来的都是字符串。 可相加:字符串的拼接。 可相乘:str * int 阅读全文
posted @ 2021-05-08 17:42
索命菩萨
阅读(44)
评论(0)
推荐(0)
浙公网安备 33010602011771号