🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Cloud Networking: all 10 questions

Quiz: Cloud Networking · Question 7 of 10

What does this print? (code)

What does this print?

import ipaddress
net = ipaddress.ip_network("10.0.0.0/22")
print(net.num_addresses, len(list(net.subnets(new_prefix=24))))
  1. A.256 4
  2. B.1024 2
  3. C.1024 4
  4. D.4096 4
Answer & explanation

Correct answer: 1024 4

A /22 has 10 free bits (1,024 addresses), which splits into 4 blocks of /24.

Can you get the rest right without peeking?

Take the timed Quiz: Cloud Networking quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →