CSE505/Assignment1/randomgen.py
2024-02-22 17:33:26 -05:00

10 lines
256 B
Python

import random
import sys
if len(sys.argv) == 2: x = int(sys.argv[1])
else: x = 1000
file = open("reachin1000", "w")
for i in range(10 * x):
j = random.randint(1,x)
k = random.randint(1,x)
file.write("edge({}, {}).\n".format(i, j))
file.close()