当前位置:首页 → 计算机类 → 软件水平考试 → 初级程序员->给出股票价格压力位是17,支撑位是15,我们策略是突破压力位
给出股票价格压力位是17,支撑位是15,我们策略是突破压力位做买入(print('buy')),跌破支撑位做卖出(print('sell')),否则不做操作。请写出判断逻辑语句。
price = 16if price>17.0: print('buy')elif price>15.0: print('hold')
else: print('sell')