Python编写简单的剪刀石头布小程序
一、程序要求(1)提示用户选择石头剪刀布(2)计算机随机选择石头剪刀布(3)判断用户输赢(4)打印结果二、代码实现import random# 电脑人随机出拳computer = random.randint(1, 3)user = int(input('请出拳:1.拳头,2.剪刀,3.布'))if computer == 1: computer = '拳头'elif computer == 2: computer = '剪刀'else: compute