|
|
@ -23,5 +23,5 @@ p2 = int(ipdec.pop(0)/256**2)
|
|
|
|
sum2 = sum(ipdec)
|
|
|
|
sum2 = sum(ipdec)
|
|
|
|
w = len(ip)+8
|
|
|
|
w = len(ip)+8
|
|
|
|
print(f'Address {ip} equals dec {sum0} / {p1}.{sum1} / {p1}.{p2}.{sum2}')
|
|
|
|
print(f'Address {ip} equals dec {sum0} / {p1}.{sum1} / {p1}.{p2}.{sum2}')
|
|
|
|
print(f'{" ": <{w}} equals oct 0{sum0:o} / 0{p1:o}.0{sum1:o} / 0{p1:o}.0{p2:0}.0{sum2:o}')
|
|
|
|
print(f'{" ": <{w}} equals oct 0{sum0:o} / 0{p1:o}.0{sum1:o} / 0{p1:o}.0{p2:o}.0{sum2:o}')
|
|
|
|
print(f'{" ": <{w}} equals hex {sum0:#x} / {p1:#x}.{sum1:#x} / {p1:#x}.{p2:#x}.{sum2:#x}')
|
|
|
|
print(f'{" ": <{w}} equals hex {sum0:#x} / {p1:#x}.{sum1:#x} / {p1:#x}.{p2:#x}.{sum2:#x}')
|
|
|
|