寻找高频单词,教师分配,字符串转换元组,

# # 寻找高频单词
# stopword = ['am', 'is', 'are', 'which', 'where', 'when']
# s=['What is deep learning?','Deep learning is a subset of machine learning, which is essentially a neural network with three or more layers.','These neural networks attempt to simulate the behavior of the human brain—albeit far from matching its ability—allowing it to learning from large amounts of data.']
# words=[]
# for sentence in s:
#     t=[]
#     for i in sentence.split():
#         b = i.strip(',|?|.|!')
#         if b not in stopword:
#             t.append(b)
#     words.append(t)
# # print(words)
# word123=words[0]+words[1]+words[2]
# # print(word123)
# max=-1
# for i in word123:
#     if word123.count(i)>max:
#         max=word123.count(i)
#         l=i
# print(l,max)

#教师分配
# import  random
# teacher=[0,1,2,3,4,5,6,7]#定义8个教师
# s=[[],[],[]]#定义3个教室
# for i in teacher:#8个教师遍历一遍
#     num = random.randint(0, 2)#随机选择一个教室
#     s[num].append(i)#放入教师
# print(s)#输出

#字符串转换成元组
# s='232'
# t=tuple(s)
# print(t)

#统计字数个数
# a=(-1,-3,-2,-4,0,0,0,1,2,3,4)
# zheng=0
# fu=0
# ling=0
# for i in range(len(a)):
#     if a[i]==0:
#         ling+=1
#     elif a[i]<0:
#         fu+=1
#     elif a[i]>0:
#         zheng+=1
# print(ling,zheng,fu)

#中文数字对照
a=input()
t=tuple(a)
s=('零','壹','贰','叁','肆','伍','陆','柒','捌','玖')
for i in range(len(t)):
    print(s[int(t[i])],end='')

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值