最新发布第4页

Python_上学期复习—课后作业

1.编写一个程序,能计算下面公式计算并输出 x 的值。 $$x=\frac{-b+\sqrt{b^{2}-4ac}}{2a}$$ 代码: a = int(input('请输入a的值:')) b = int(input('请输入b的值:')) c = int(input('请输入c...

数据库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年前
01008

Python_封装和继承_练习

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

数据类型综合练习

1.编写一个程序来反转一个字符串。例如,输入'Hello World'应输出'World Hello'。 str = input('请输入字符串:') str_list = str.split() new_str_list = ' '.join(str_list[::-1]) print(new_...

Python_函数练习题

1. 编写一个函数,该函数接收两个数字作为输入,并返回这两个数字的最大公约数。 def fun(x, y): while y != 0: temp = y y = x % y x = temp return x num1 = int(input('请输入第一个数字: '...

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年前
01127

作业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年前
0877

Python上课笔记_20231204

1.计票机制 p = {} while True: xm = input('请输入选手姓名(输入0退出):') if xm == '0': break ps = int(input('请输入票数:')) p[xm] = ps items = p.items() li = [] for i in items: li.ap...
华中农业大学:   官网导航栏-北梦の博客

华中农业大学: 官网导航栏

<!DOCTYPE html> <html> <head> <meta charset='UTF-8'> <title>导航栏</title> <style type='text/css'> *{margin: 0; padding: 0;} body{font-siz...
珊瑚海的头像-北梦の博客珊瑚海2年前
01345