最新发布第8页
python购物车练习-北梦の博客

python购物车练习

class Shopping: def __init__(self): self.car = [] def shopping_car(self, itme): self.car.append(itme) def shopping_del(self, itme): self.car.remove(itme) def shopping_all(self): if...

Python_练习_24.3.28

class ShoppingCart: def __init__(self): self.items = [] def add_items(self, item): if item in items_price: self.items.append(item) print(f'{item}已添加到购物车') else: print(f'没有...

Python_练习_24.3.22

class School_number(): def __init__(self, name, age): self.name = name self.age = age def describe(self): print(f'我的名字是{self.name},我的年龄是{self.age}') class Student(School...

python 24.3.21 作业

'''1. 使用继承机制,为Car类创建两个子类:赛车(Racing_Car)类和公交车(Bus)类。 为Car类定义属性最高时速(Top_speed)属性和核载人数(Nuclear_Number)方法, 并分别通过子类对象调用父...
koniaoer的头像-北梦の博客koniaoer1年前
234012

Python_封装和继承_练习

使用继承机制,为Car类创建两个子类:赛车(Racing_Car)类和公交车(Bus)类。为Car类定义属性最高时速(Top_speed)属性和核载人数(Nuclear_Number)方法,并分别通过子类对象调用父类中的成...

作业2024数据库3月8

-- 第一个 create table if not exists acc_ount( userid char(6) not null primary key comment '用户名', fullname varchar(10) not null comment '用户名', pass_word varchar(20) not null ...
珊瑚海的头像-北梦の博客珊瑚海1年前
01057

数据库MYsql笔记2024年3月18

-- (1)删除数据库 drop database if exists t4; -- (2)创建数据库 create database if not exists t4; -- (3)使用数据库 use t4; -- 删除数据表 drop table if exists book; -- 在t3中创建数据...
珊瑚海的头像-北梦の博客珊瑚海1年前
01188

mysql课堂训练–yxj

-- (1)删除数据库 drop database if exists t3; -- (2)创建数据库 create database if not exists t3; -- (3)使用数据库 use t3; -- 第一篇 drop table if exists account; create table if not...
iu不错哦的头像-北梦の博客iu不错哦1年前
01377

MYSQL_练习_5个表_24.3.18

drop database if exists t4; create database if not exists t4; use t4; drop table if exists account; create table account ( userid char(6) not null primary key comment '用户号', ful...