python基礎學習-判斷if語句、 循環語句while

判斷語句=分支語句 邏輯運算 and or not(取反) 隨機數: 石頭剪刀布遊戲 import random player = int(input('請輸入您要出的拳:石頭(1)剪刀(2)布(3):')) computer = random.randint(1,3) print('玩家出的是%d,電腦出的是%d'%(player,computer)) if ((player == 1 and
相關文章
相關標籤/搜索