Advertisement
KimWanChul

Untitled

Mar 27th, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.31 KB | None | 0 0
  1. p_add = raw_input('Vvedite ip address:')
  2. oct1 = ip_add.split('.')
  3. #oct2 = int(ip_add.split('.')
  4. Ioct = int(oct1[0])
  5.  
  6. if 0 < Ioct < 224:
  7.         print 'unicast'
  8. elif 223 < Ioct < 239:
  9.         print 'multicast'
  10. elif oct1 == ['255','255','255','255']:
  11.         print 'broadcast'
  12. else:
  13.         print 'unused'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement