# 区间排序
# price=[399,4369,539,288,189,749,235,190,99,1000]#总列表
# min=int(input('请输入最小值:'))
# max=int(input('请输入最大值:'))
# select=[]#输出的列表
# for i in price:#遍历每个元素
# if min <= i <=max:#如果有满足
# select.append(i)#放入select
# a=int(input('请输入排序方式.1.升序 2.降序'))
# if a==1:
# select.sort()#排序
# elif a==2:
# select.sort(reverse=True)
# print(select)#输出
# 年龄与疾病
# a=int(input())#有几个人
# select=[]#列表装入每个人的年龄
# for i in range(a):#循环放入
# b=int(input())
# select.append(b)
# a1=0
# a2=0
# a3=0
# a4=0
# for i in select:
# if i<=18:
# a1+=1
# elif i<=35:
# a2+=1
# elif i<=60:
# a3+=1
# else:
# a4+=1
# print('{:.2%}'.format(a1/a))
# print('{:.2%}'.format(a2/a))
# print('{:.2%}'.format(a3/a))
# print('{:.2f}'.format(3))
# 寻找高频单词
# stopword = ['am', 'is', 'are', 'which', 'where', 'when']
# s = input()
# words = s.split() # 把文章以空格分开成列表
# new_word = []
# for word in words:
# t = word.strip(',|?|.|!')
# if t not in stopword:
# new_word.append(t)
# max = 0
# for i in new_word:
# if new_word.count(i) > max:
# t = i
# max = new_word.count(i)
# print(t, max)
#好友管理系统
# select=[]
# print('欢迎使用好友管理系统')
# while(True):
# print('请输入您的操作')
# a=int(input('1:添加好友 2:删除好友 3:备注好友 4:展示好友 5:退出\n'))
# if a==1:
# add=input('您要添加的好友:')
# select.append(add)
# elif a==2:
# re=input('您要删除的好友:')
# select.remove(re)
# elif a==3:
# str1 = input('您要备注的好友:')
# str2 = input('备注是:')
# str3=str1+'('+str2+')'
# select.remove(str1)
# select.append(str3)
# elif a==4:
# print(select)
# elif a==5:
# break
区间排序,年龄与疾病,寻找高频单词,好友管理系统
于 2023-10-07 13:11:37 首次发布