Commit 685b70a3 by BellCodeEditor

save project

parent ca967247
Showing with 1629 additions and 1 deletions
...@@ -5,4 +5,9 @@ import random ...@@ -5,4 +5,9 @@ import random
list=["剪刀","石头","布"] list=["剪刀","石头","布"]
com = random.choice(list) com = random.choice(list)
print("电脑出拳"+com) print("电脑出拳"+com)
if player==com:
print("平局")
elif(player=="石头" and com=="剪刀") or (player=="布" and com=="石头" )or (player=="布" and com=="石头"):
print("玩家赢了")
else:
print("玩家输了")
\ No newline at end of file
# True and False are deliberately omitted because they are keywords in
# Python 3, and stub files conform to Python 3 syntax.
from typing import (
TypeVar, Iterator, Iterable, NoReturn, overload, Container,
Sequence, MutableSequence, Mapping, MutableMapping, Tuple, List, Any, Dict, Callable, Generic,
Set, AbstractSet, FrozenSet, MutableSet, Sized, Reversible, SupportsInt, SupportsFloat, SupportsAbs,
SupportsComplex, IO, BinaryIO, Union,
ItemsView, KeysView, ValuesView, ByteString, Optional, AnyStr, Type, Text,
Protocol,
)
from abc import abstractmethod, ABCMeta
from ast import mod, AST
from types import TracebackType, CodeType
import sys
if sys.version_info >= (3,):
from typing import SupportsBytes, SupportsRound
_T = TypeVar('_T')
_T_co = TypeVar('_T_co', covariant=True)
_KT = TypeVar('_KT')
_VT = TypeVar('_VT')
_S = TypeVar('_S')
_T1 = TypeVar('_T1')
_T2 = TypeVar('_T2')
_T3 = TypeVar('_T3')
_T4 = TypeVar('_T4')
_T5 = TypeVar('_T5')
_TT = TypeVar('_TT', bound='type')
class object:
__doc__: Optional[str]
__dict__: Dict[str, Any]
__slots__: Union[Text, Iterable[Text]]
__module__: str
if sys.version_info >= (3, 6):
__annotations__: Dict[str, Any]
@property
def __class__(self: _T) -> Type[_T]: ...
@__class__.setter
def __class__(self, __type: Type[object]) -> None: ...
def __init__(self) -> None: ...
def __new__(cls) -> Any: ...
def __setattr__(self, name: str, value: Any) -> None: ...
def __eq__(self, o: object) -> bool: ...
def __ne__(self, o: object) -> bool: ...
def __str__(self) -> str: ...
def __repr__(self) -> str: ...
def __hash__(self) -> int: ...
def __format__(self, format_spec: str) -> str: ...
def __getattribute__(self, name: str) -> Any: ...
def __delattr__(self, name: str) -> None: ...
def __sizeof__(self) -> int: ...
def __reduce__(self) -> tuple: ...
def __reduce_ex__(self, protocol: int) -> tuple: ...
if sys.version_info >= (3,):
def __dir__(self) -> Iterable[str]: ...
if sys.version_info >= (3, 6):
def __init_subclass__(cls) -> None: ...
class staticmethod(object): # Special, only valid as a decorator.
__func__: Callable
if sys.version_info >= (3,):
__isabstractmethod__: bool
def __init__(self, f: Callable) -> None: ...
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
class classmethod(object): # Special, only valid as a decorator.
__func__: Callable
if sys.version_info >= (3,):
__isabstractmethod__: bool
def __init__(self, f: Callable) -> None: ...
def __new__(cls: Type[_T], *args: Any, **kwargs: Any) -> _T: ...
def __get__(self, obj: _T, type: Optional[Type[_T]] = ...) -> Callable: ...
class type(object):
__base__: type
__bases__: Tuple[type, ...]
__basicsize__: int
__dict__: Dict[str, Any]
__dictoffset__: int
__flags__: int
__itemsize__: int
__module__: str
__mro__: Tuple[type, ...]
__name__: str
if sys.version_info >= (3,):
__qualname__: str
__text_signature__: Optional[str]
__weakrefoffset__: int
@overload
def __init__(self, o: object) -> None: ...
@overload
def __init__(self, name: str, bases: Tuple[type, ...], dict: Dict[str, Any]) -> None: ...
@overload
def __new__(cls, o: object) -> type: ...
@overload
def __new__(cls, name: str, bases: Tuple[type, ...], namespace: Dict[str, Any]) -> type: ...
def __call__(self, *args: Any, **kwds: Any) -> Any: ...
def __subclasses__(self: _TT) -> List[_TT]: ...
# Note: the documentation doesnt specify what the return type is, the standard
# implementation seems to be returning a list.
def mro(self) -> List[type]: ...
def __instancecheck__(self, instance: Any) -> bool: ...
def __subclasscheck__(self, subclass: type) -> bool: ...
if sys.version_info >= (3,):
@classmethod
def __prepare__(metacls, __name: str, __bases: Tuple[type, ...], **kwds: Any) -> Mapping[str, Any]: ...
class super(object):
if sys.version_info >= (3,):
@overload
def __init__(self, t: Any, obj: Any) -> None: ...
@overload
def __init__(self, t: Any) -> None: ...
@overload
def __init__(self) -> None: ...
else:
@overload
def __init__(self, t: Any, obj: Any) -> None: ...
@overload
def __init__(self, t: Any) -> None: ...
class int:
@overload
def __init__(self, x: Union[Text, bytes, SupportsInt] = ...) -> None: ...
@overload
def __init__(self, x: Union[Text, bytes, bytearray], base: int) -> None: ...
@property
def real(self) -> int: ...
@property
def imag(self) -> int: ...
@property
def numerator(self) -> int: ...
@property
def denominator(self) -> int: ...
def conjugate(self) -> int: ...
def bit_length(self) -> int: ...
if sys.version_info >= (3,):
def to_bytes(self, length: int, byteorder: str, *, signed: bool = ...) -> bytes: ...
@classmethod
def from_bytes(cls, bytes: Sequence[int], byteorder: str, *,
signed: bool = ...) -> int: ... # TODO buffer object argument
def __add__(self, x: int) -> int: ...
def __sub__(self, x: int) -> int: ...
def __mul__(self, x: int) -> int: ...
def __floordiv__(self, x: int) -> int: ...
if sys.version_info < (3,):
def __div__(self, x: int) -> int: ...
def __truediv__(self, x: int) -> float: ...
def __mod__(self, x: int) -> int: ...
def __divmod__(self, x: int) -> Tuple[int, int]: ...
def __radd__(self, x: int) -> int: ...
def __rsub__(self, x: int) -> int: ...
def __rmul__(self, x: int) -> int: ...
def __rfloordiv__(self, x: int) -> int: ...
if sys.version_info < (3,):
def __rdiv__(self, x: int) -> int: ...
def __rtruediv__(self, x: int) -> float: ...
def __rmod__(self, x: int) -> int: ...
def __rdivmod__(self, x: int) -> Tuple[int, int]: ...
def __pow__(self, x: int) -> Any: ... # Return type can be int or float, depending on x.
def __rpow__(self, x: int) -> Any: ...
def __and__(self, n: int) -> int: ...
def __or__(self, n: int) -> int: ...
def __xor__(self, n: int) -> int: ...
def __lshift__(self, n: int) -> int: ...
def __rshift__(self, n: int) -> int: ...
def __rand__(self, n: int) -> int: ...
def __ror__(self, n: int) -> int: ...
def __rxor__(self, n: int) -> int: ...
def __rlshift__(self, n: int) -> int: ...
def __rrshift__(self, n: int) -> int: ...
def __neg__(self) -> int: ...
def __pos__(self) -> int: ...
def __invert__(self) -> int: ...
if sys.version_info >= (3,):
def __round__(self, ndigits: Optional[int] = ...) -> int: ...
def __getnewargs__(self) -> Tuple[int]: ...
def __eq__(self, x: object) -> bool: ...
def __ne__(self, x: object) -> bool: ...
def __lt__(self, x: int) -> bool: ...
def __le__(self, x: int) -> bool: ...
def __gt__(self, x: int) -> bool: ...
def __ge__(self, x: int) -> bool: ...
def __str__(self) -> str: ...
def __float__(self) -> float: ...
def __int__(self) -> int: ...
def __abs__(self) -> int: ...
def __hash__(self) -> int: ...
if sys.version_info >= (3,):
def __bool__(self) -> bool: ...
else:
def __nonzero__(self) -> bool: ...
def __index__(self) -> int: ...
class float:
def __init__(self, x: Union[SupportsFloat, Text, bytes, bytearray] = ...) -> None: ...
def as_integer_ratio(self) -> Tuple[int, int]: ...
def hex(self) -> str: ...
def is_integer(self) -> bool: ...
@classmethod
def fromhex(cls, s: str) -> float: ...
@property
def real(self) -> float: ...
@property
def imag(self) -> float: ...
def conjugate(self) -> float: ...
def __add__(self, x: float) -> float: ...
def __sub__(self, x: float) -> float: ...
def __mul__(self, x: float) -> float: ...
def __floordiv__(self, x: float) -> float: ...
if sys.version_info < (3,):
def __div__(self, x: float) -> float: ...
def __truediv__(self, x: float) -> float: ...
def __mod__(self, x: float) -> float: ...
def __divmod__(self, x: float) -> Tuple[float, float]: ...
def __pow__(self, x: float) -> float: ... # In Python 3, returns complex if self is negative and x is not whole
def __radd__(self, x: float) -> float: ...
def __rsub__(self, x: float) -> float: ...
def __rmul__(self, x: float) -> float: ...
def __rfloordiv__(self, x: float) -> float: ...
if sys.version_info < (3,):
def __rdiv__(self, x: float) -> float: ...
def __rtruediv__(self, x: float) -> float: ...
def __rmod__(self, x: float) -> float: ...
def __rdivmod__(self, x: float) -> Tuple[float, float]: ...
def __rpow__(self, x: float) -> float: ...
def __getnewargs__(self) -> Tuple[float]: ...
if sys.version_info >= (3,):
@overload
def __round__(self) -> int: ...
@overload
def __round__(self, ndigits: None) -> int: ...
@overload
def __round__(self, ndigits: int) -> float: ...
def __eq__(self, x: object) -> bool: ...
def __ne__(self, x: object) -> bool: ...
def __lt__(self, x: float) -> bool: ...
def __le__(self, x: float) -> bool: ...
def __gt__(self, x: float) -> bool: ...
def __ge__(self, x: float) -> bool: ...
def __neg__(self) -> float: ...
def __pos__(self) -> float: ...
def __str__(self) -> str: ...
def __int__(self) -> int: ...
def __float__(self) -> float: ...
def __abs__(self) -> float: ...
def __hash__(self) -> int: ...
if sys.version_info >= (3,):
def __bool__(self) -> bool: ...
else:
def __nonzero__(self) -> bool: ...
class complex:
@overload
def __init__(self, re: float = ..., im: float = ...) -> None: ...
@overload
def __init__(self, s: str) -> None: ...
@overload
def __init__(self, s: SupportsComplex) -> None: ...
@property
def real(self) -> float: ...
@property
def imag(self) -> float: ...
def conjugate(self) -> complex: ...
def __add__(self, x: complex) -> complex: ...
def __sub__(self, x: complex) -> complex: ...
def __mul__(self, x: complex) -> complex: ...