IT Log

Record various IT issues and difficulties.

Tag: generate


  • How to generate non-consecutive integers randomly

    To generate non-consecutive random integers, follow these steps: Initialize an empty list to store the generated numbers. Loop until you have generated the desired number of integers: Generate a random integer within your specified range. Check if this integer is consecutive (differs by 1) from any already in the list. If it’s not consecutive, add…