控制流if语句if 判断条件:game = 1000 money = 100000 if game<2000: game+=1000 money-=1000 print('You have '+str(game)+'RMB in your game,' + 'you have '+str(money)+'RMB in your money!')You have 2000RMB in your game,you have 99000RMB in your money!if 、else 、elifpeople='Tom' if people=='Mary': print('Hello Mary!') elif people=='Tom': print('Hello,Tom~') else: print('Go away~')Hello,Tom~fo
一只胖橘