Explain what the lines 11-16 do in the code does and change them or code them alternatively to get the same output. n="0xade1" num1=int(n,16) print(num1) list1=[] num2=num1 while(num2>0):...


Explain what the lines 11-16 do in the code does and change them or code them alternatively to get the same output.


n="0xade1"
num1=int(n,16)
print(num1)
list1=[]
num2=num1
while(num2>0):
list1.append(num2%16)
num2=num2//16
list1.reverse()
print(list1)
first = list1[0] >> 2
for i in range(3):
first = (first < 2)="" |="" (list1[i="" +="" 1]="">> 2)
second = list1[0] & 3
for i in range(3):
second = (second < 2)="" |="" (list1[i="" +="" 1]="" &="">
print(first,second)




Jun 04, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions ยป

Submit New Assignment

Copy and Paste Your Assignment Here