## 谁说要从hello world开始的 原

蛋疼的淡定哥

``import random``
``````def creatRandum(rangeSize, arrSize):
arr = [0 for x in range(0,arrSize)]
rangeArr = [x + 1 for x in range(rangeSize)]
for i in range(len(arr)) :
arr[i] = rangeArr[random.randint(0, len(rangeArr) - 1)]
rangeArr.remove(arr[i])
arr.sort()
return arr``````
``````def creatDouble():
redball = creatRandum(33, 6)
blueball = random.randint(1,16)

print ("redball:")
for a in redball :
print (a," ",end='')
print ("")
print ("blueball:")
print (blueball,end='')``````
``````def creatDaLeTou():
beforeArea = creatRandum(35, 5)
afterArea = creatRandum(12, 2)

print("beforArea:")
for i in beforeArea :
print(i," ",end='')

print("")
print("afterArea:")
for i in afterArea :
print(i," ",end='')

type = input("Enter your type:")
while type != "exit" :
if type == "ssq" :
creatDouble()
elif type == "dlt" :
creatDaLeTou()
else :
print("No this type")
print("")
type = input("Enter your type:")``````

© 著作权归作者所有

### 蛋疼的淡定哥

cloudman6
2017/12/22
0
0
python异步编程之asyncio（百万并发）

p柯西
2018/06/12
0
0
Oracle中INSTR函数和SUBSTR函数

1、INSTR函数 语法： instr( string1, string2 [, start_position [, nth_appearance ] ] ) 参数： string1：源字符串，要在此字符串中查找。 string2：要在string1中查找的字符串. start_p...

2017/11/12
0
0
[译]Hello World With JBoss Modules

JBoss Modules是一个相当有趣的项目，他在Jboss应用服务器和Jboss生态系统项目中扮演者重要的角色。但是，网上关于Jboss Modules的东西却很少。甚至Jboss Modules的官方文档都是不完整的，更...

2017/05/04
0
0
Gradle Tips#1-tasks

2015/09/20
46
0

ehcache

15分钟前
0
0
Android服务2 BindService

MainActivity { class MyService extends Service { public void onCreate() {} public IBinder onBind(Intent intent) { //return new Binder(); retutn new MyBinder(); } public boolean ......

Coding缘
54分钟前
0
0

Java填坑路

1
0

1
0

2
0