10 2022 档案

摘要:碳循环计划 1.内胚型 蛋白质每公斤摄入0.8-1g 碳水每公斤摄入2g 脂肪每公斤摄入2.8g 2.实操计划 2.1 以周为单位计算每周碳蛋脂总量 每天的碳水和脂肪摄入: **碳水:**62kg x 2g = 124g ; **脂肪:**62kg x 0.8g = 49.6g 每周的碳水和脂肪摄入 阅读全文
posted @ 2022-10-26 17:11 itsalexSun 阅读(870) 评论(0) 推荐(0)
摘要:num = 10 print(num.__class__) s = "abc" print(s.__class__) class Person(): pass p = Person() print(p.__class__) print(int.__class__) print(str.__class 阅读全文
posted @ 2022-10-24 15:08 itsalexSun 阅读(19) 评论(0) 推荐(0)
摘要:class Person: # 类属性 age = 0 def shilifangfa(self): print(self) # <__main__.Person object at 0x00000221C61E0FD0> print(self.age) # 0 print(self.num) # 阅读全文
posted @ 2022-10-24 15:07 itsalexSun 阅读(21) 评论(0) 推荐(0)
摘要:1. 实例方法 实例方法通过实例来调用。 class Person: def eat(self, food): print("在吃饭", food) p = Person() p.eat("tudou") 2. 类方法 类方法的调用方式: 类.方法() 用实例来调用类方法,会自动把实例屏蔽,然后用类 阅读全文
posted @ 2022-10-24 15:05 itsalexSun 阅读(93) 评论(0) 推荐(0)
摘要:class Person: # 实例方法 def eat2(self): # 要求第一个参数接收的是一个实例,也就是说需要对象的调用 print("这是一个实例方法",self) # 类方法 @classmethod def leifangfa(cls): # 要求第一个参数接收的是一个类 prin 阅读全文
posted @ 2022-10-24 14:56 itsalexSun 阅读(67) 评论(0) 推荐(0)
摘要:题目链接:LeetCode59 代码 点击查看代码 class Solution { public int[][] generateMatrix(int n) { int loop = 0;// 控制循环次数 int [][] res = new int [n][n]; int start = 0; 阅读全文
posted @ 2022-10-24 09:07 itsalexSun 阅读(67) 评论(0) 推荐(0)