write a program to convert a decimal integer into base 4 eqivalent representation in python
Answers
Answered by
1
Answer:
Convert from any base to decimal and vice versa
Given a number and its base, convert it to decimal. The base of number can be anything such that all digits can be represented using 0 to 9 and A to Z. The value of A is 10, the value of B is 11 and so on. Write a function to convert the number to decimal.
Examples:
Input number is given as string and output is an integer. Input: str = "1100", base = 2 Output: 12 Input: str = "11A", base = 16 Output: 282 Input: str = "123", base = 8 Output: 83
Explanation:
bhai answer acha laga ho to mark me brienlset
Similar questions