区间排序,年龄与疾病,寻找高频单词,好友管理系统

# 区间排序
# 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

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值