fork download
  1. import random
  2.  
  3. def generate_sets():
  4. NUM_SETS = 10
  5. NUMBERS_PER_SET = 7
  6. MIN_NUM = 1
  7. MAX_NUM = 100
  8.  
  9. separator = "-----" * 10
  10.  
  11. for i in range(NUM_SETS):
  12. # Generate 10 unique numbers for this set
  13. numbers = random.sample(range(MIN_NUM, MAX_NUM + 1), NUMBERS_PER_SET)
  14.  
  15. # Print numbers separated by dashes
  16. print("-".join(str(n) for n in numbers))
  17.  
  18. # Print separator between sets (except last one)
  19. if i != NUM_SETS - 1:
  20. print(separator)
  21.  
  22. if __name__ == "__main__":
  23. generate_sets()
Success #stdin #stdout 0.1s 14224KB
stdin
Standard input is empty
stdout
61-7-21-83-32-52-10
--------------------------------------------------
27-29-93-66-67-14-23
--------------------------------------------------
77-74-28-81-86-47-99
--------------------------------------------------
86-91-60-3-42-98-58
--------------------------------------------------
91-63-61-49-48-30-13
--------------------------------------------------
20-49-57-23-60-75-80
--------------------------------------------------
24-22-76-25-28-6-18
--------------------------------------------------
95-19-5-49-16-75-59
--------------------------------------------------
99-19-55-87-2-40-29
--------------------------------------------------
50-26-87-40-34-38-21