摘要: 1 name = "南天信息股份有限公司" 2 stock_price = 120 3 stock_code = "002003" 4 stock_price_daily_growth_factor = 1.3 5 growth_days = 7 6 print(f"公司:{name},股票代码:{ 阅读全文
posted @ 2023-03-08 17:38 tomatoA250 阅读(29) 评论(0) 推荐(0)
摘要: int(x) :将x转换为一个整数 float(x) :将X转换为一个浮点数 str(x) :将对象x转换为一个字符串 注:任何类型都可以转换为字符串 字符串不可以随意转换成数字 浮点数转整数会丢失精度(会丢失掉小数的部分) 阅读全文
posted @ 2023-03-08 11:40 tomatoA250 阅读(13) 评论(0) 推荐(0)