Python 人机猜拳练习笔记

import random
# print("1.曹操2.孙权3.刘备")
# class Person:
#     def __init__(self,jue):
#         while True:
#             self.jue = int(input("请选择角色序号:"))
#             if self.jue==1:
#                 self.jue="曹操"
#                 break
#             elif self.jue==2:
#                 self.jue = "孙权"
#                 break
#             elif self.jue==3:
#                 self.jue = "刘备"
#                 break
#             else:
#                 print("输入有错误,请重新输入")
#     def caiquan(self):
#         while True:
#             global quan
#             quan=int(input("请出拳(选择序号):1.剪刀2.石头3."))
#             if quan==1:
#                 print("{0}的出拳--剪刀".format(self.jue))
#                 break
#             elif quan==2:
#                 print("{0}的出拳--石头".format(self.jue))
#                 break
#             elif quan==3:
#                 print("{0}的出拳--".format(self.jue))
#                 break
#             else:
#                 print("输入有错误,请重新输入")
# cai=Person(1)
# cai.caiquan()
# class Computer:
#     def __init__(self,dc):
#         self.dc="
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值