

(10101)_2=(21)10


Given : Number (10101)_2(10101)2
To find : What is the value of (10101)_2(10101)2 in decimal number system?
Solution :
Decimal number system is a positional numeral system employing 10 as the base.
Now, to convert it into base 10
Multiply each digit of the following binary by the corresponding power of 2:
(10101)_2(10101)2
=1\times 2^4+0\times 2^3+1\times 2^2+0\times 2^1+1\times 2^0=1×24+0×23+1×22+0×21+1×20
=1\times 16+0\times 8+1\times 4+0\times 2+1\times 1=1×16+0×8+1×4+0×2+1×1
=16+0+4+0+1=16+0+4+0+1
=21=21
Therefore, (10101)_2=(21)_{10}(10101)2=(21)10
Driving is considered a privilege because you have to be a certain age to start driving and be able to drive by yourself legally. Driving can be dangerous if you are not a safe driver and if you do illegal things while behind the wheel. Driving is also a privilege because you have to be responsible when driving, because the people that are around you or with you, their lives are in your hands.
Your answer is: You need to carry the responsibility of being safe and not harming yourself or others.
Have an amazing day!
Answer:
def generate_list(listA, listB):
listC = []
for item in listA[0::2]:
listC.append(item)
for items in listB[1::2]:
listC.append(items)
return sorted(listC)
Explanation:
The python program defines a function called generate_list that accepts two list arguments. The return list is the combined list values of both input lists with the even index value from the first list and the odd index value from the second list.