Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- spammode = input("y for spam mode or n for no spam mode")
- generalfilename = input("generalfilename = ")
- z = int(input("z = "))
- y = int(input("y = "))
- x = int(input("x = "))
- m = int(input("m = "))
- i = 0
- h = 0
- print("i = 0")
- print("h = 0")
- while z < y + 1 :
- txt1 = open(generalfilename + str(i) + ".txt", "a+")
- h = 0
- while h < x :
- i = 0
- h = h + 1
- while i <= m :
- i = i + 1
- txt1.write("This is line number %d\r\n" % (i))
- if spammode == "y" :
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
- print("Lines written = " + str(h * m))
- print("File " + str(z) + " written successfully")
- txt1.close()
- z = z + 1
- print("Task completed successfully")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement