排序
Linux【yum源】一键换源(全)
中国教育网海外 bash <(curl -sSLk https://cdn.b52m.cn/static/linuxsource.sh) bash <(curl -sSLk https://cdn.b52m.cn/static/linuxsource.sh) --edu bash <(curl -sSLk https://cd...
Python课案例:计票机制
y = {} x = [] print('输入quit表示选手成绩录入完毕') while True: name = input('输入选手名称: \n') if name == 'quit': break score = float(input('请输入选手票数: \n')) y[name] = score...
Python_函数练习题
1. 编写一个函数,该函数接收两个数字作为输入,并返回这两个数字的最大公约数。 def fun(x, y): while y != 0: temp = y y = x % y x = temp return x num1 = int(input('请输入第一个数字: '...
Python_练习_24.3.15
class Friend: def __init__(self): self.friend_li = {} # 实例方法 def welcome(self): print('欢迎来到好友管理系统') print('1.添加好友') print('2.删除好友') print('3.展示好友') print(...
Python_练习_24.3.8
1.写出下列题目中的pyhon语句 定义一个Employee类(员工) 在员工类中定义类属性age(年龄)为40 定义一个方法displayCount(),输出“公司最高工资” 通过类Employee修改类属性age的值=35 在方...
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...
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'没有...