0
点赞
收藏
分享

微信扫一扫

cc.的日常

皮皮球场 2022-02-13 阅读 36

2022.2.12

reconcile 调和

imminent 即将发生的

rebellion 叛乱

wedge 楔

reinforce 加强

diffuse 扩散

appointment 任命

irony 反讽

approximate 大约的

venue 场地

constituent 组成部分

robust 不妥协的

amplify 放大

eminent 卓越的

coalition 结合体

salvation 拯救

appraisal 估计

academy 学院

naughty 顽皮的

paradigm 范例

vibrate 震动


python

class Car:
    def __init__(self,brand):
        self.brand=brand
    def start(self):
        print('汽车已启动..')

car=Car('宝马X5')
car.start()
print(car.brand)

class Student:
    def __init__(self,name,age):
        self.name=name
        self.__age=age
    def show(self):
        print(self.name,self.__age)

stu=Student('张三',20)
stu.show()
#在类的使用使用name与age
print(stu.name)
#print(stu.__age)
print(dir(stu))
print(stu._Student__age)  #在类的外部可以通过_Student__age进行访问
class Person(object):
    def __init__(self, name, age):
        self.name=name
        self.age=age
    def info(self):
        print(self.name, self.age)

class Student(Person):
    def __init__(self, name, age, stu_no):
        super().__init__(name, age)
        self.stu_no=stu_no
    def info(self):
        super().info()
        print(self.stu_no)

class Teacher(Person):
    def __init__(self, name, age, teachofyear):
        super(Teacher, self).__init__(name,age)
        self.teachofyear=teachofyear

stu=Student('张三', 20, '1811')
teacher=Teacher('李四', 34, 10)

stu.info()
teacher.info()

2022.2.13

反转字符串

s+left 表示 一个地址

s[left]表示s数组中left位置上的值


jungle 丛林

dissipate 消散

paradigm 范例

physiology 生理

robust 强劲的

nutrition 食物

amplify 放大

missile 导弹

sculpture 雕像

Herald 预兆

venue 场地

delegate 选派

salvation 拯救

protocol 礼仪

shell 壳

tribute 贡税

举报

相关推荐

0 条评论