摘要:
from math import pi class Circle: def __init__(self, r): self.r = r def area(self): return pi*self.r*self.r def per(self): return 2*pi*self.r class Ring: ... 阅读全文
摘要:
column_dic = {"id": 0, "name": 1, "age": 2, "phone": 3, "job": 4} def get_show_list(col_condition): # "select age,name" """ 获取要展示的列名 :param col_condition: 用户输入的select条件 :return: 列名组... 阅读全文
摘要:
class Person: country = "China" def __init__(self, name, hp, aggr, sex): # self 实际上是一个大字典 self.name = name self.hp = hp self.aggr = aggr self.sex = sex ... 阅读全文
摘要:
2.递归方法 第三种方法 阅读全文
摘要:
def Person(name, blood, aggr, sex): person = { "name": name, "blood": blood, "aggr": aggr, "sex": sex } def attack(dog): dog["blood"] -= person["a... 阅读全文