c语言,胎心率正常值,中国的秘密 王思聪
__author__ = 'zht' #!/usr/bin/env python # -*- coding: utf-8 -*- ''' #努力学习每一天 ''' import random offices = [[],[],[]] names = ['A','B','C','D','E','F','G','H'] i = 1 for name in names: index = random.randint(0,2) offices[index].append(name) print(offices) for temp in offices: print("办公室%d的人数为%d"%(i,len(temp))) for name in temp: print("%s"%(name),end=',') i+= 1 print("\n")
#某个学校,有3个办公室,现在有8位老师等待工位的分配,请编写程序,完成随机的分配
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
python求numpy中array按列非零元素的平均值案例
网友评论