pastebin

Paste Search Dynamic
Recent pastes
random choice
  1. import numpy as np
  2.  
  3. N_SYMBOLS = 32
  4. MESSAGE_LENGTH = 1_000
  5.  
  6. message = np.random.choice(N_SYMBOLS, size=MESSAGE_LENGTH)
  7.  
  8. print("First 5 symbols' numbers and thier binary representation")
  9. for symbol in message[:5]:
  10.         print(f'{symbol: >2} — {symbol:05b}')
  11.  
Parsed in 0.006 seconds