Advertisement
martinnaj

Untitled

Nov 9th, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. spammode = input("y for spam mode or n for no spam mode")
  2. generalfilename = input("generalfilename = ")
  3. z = int(input("z = "))
  4. y = int(input("y = "))
  5. x = int(input("x = "))
  6. m = int(input("m = "))
  7. i = 0
  8. h = 0
  9. print("i = 0")
  10. print("h = 0")
  11.  
  12. while z < y + 1 :
  13. txt1 = open(generalfilename + str(i) + ".txt", "a+")
  14. h = 0
  15. while h < x :
  16. i = 0
  17. h = h + 1
  18. while i <= m :
  19. i = i + 1
  20. txt1.write("This is line number %d\r\n" % (i))
  21. if spammode == "y" :
  22. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  23. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  24. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  25. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  26. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  27. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  28. txt1.write("111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111 \r\n")
  29. print("Lines written = " + str(h * m))
  30. print("File " + str(z) + " written successfully")
  31. txt1.close()
  32. z = z + 1
  33. print("Task completed successfully")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement