CSE505/Assignment1/randompath.py

9 lines
241 B
Python
Raw Normal View History

2024-02-22 23:50:15 -05:00
import random
import sys
if len(sys.argv) == 2: x = int(sys.argv[1])
else: x = 1000
file = open("randompath1000", "w")
for i in range(x):
file.write("edge({}, {}).\n".format(i, i + 1))
file.write("edge({}, 1).\n".format(x))
file.close()