Commit 1d5fff04 by sikang

update script

parent 2e9b9dcb
......@@ -21,14 +21,14 @@ def gen_rand_str():
def get_rand_code():
code = ""
num = random.randint(0, 5);
num = random.randint(0, 4);
if num == 0:
code += ";\nString " + gen_rand_str() + "=\"" + gen_rand_str() + "\";\n"
elif num == 1:
code += ";\nint " + gen_rand_str() + "=\"" + str(random.randint(0, 100000)) + "\";\n"
elif num == 3:
code += ";\nint " + gen_rand_str() + "=" + str(random.randint(0, 100000)) + ";\n"
elif num == 2:
code += ";\nif(\"" + gen_rand_str() + "\".equals(\"" + gen_rand_str() + "\")){}\n"
elif num == 4:
elif num == 3:
index = gen_rand_str()
code += ";\nfor(int " + index + "="+str(random.randint(0,10))+";"+index+"<"+str(random.randint(11,20))+";"+index+"++){}\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment