Chris was given a task by his friend rajesh. When rajesh tells a number then chris needs to convey the value in binary, octal, hexadecimal for the decimal equivalent value told by his friend rajesh.
Help them to achieve this task.
Number=int(input('Enter a integer value: ')) print("The Binary Value {}".format(bin(Number))) print("The octal Value {}".format(oct(Number))) print("The hexadecimal Value {}".format(hex(Number))) ''' INPUT Enter a integer value: 344 OUTPUT The Binary Value 0b101011000 The octal Value 0o530 The hexadecimal Value 0x158 INPUT Enter a integer value: 25 OUTPUT The Binary Value 0b11001 The octal Value 0o31 The hexadecimal Value 0x19 '''
Output:
Enter a integer value: 344
The Binary Value 0b101011000
The octal Value 0o530
The hexadecimal Value 0x158
Output:
Enter a integer value: 25
The Binary Value 0b11001
The octal Value 0o31
The hexadecimal Value 0x19
Output:
Enter a integer value: 65
The Binary Value 0b1000001
The octal Value 0o101
The hexadecimal Value 0x41
Output:
Enter a integer value: 10
The Binary Value 0b1010
The octal Value 0o12
The hexadecimal Value 0xa
Output:
Enter a integer value: 2
The Binary Value 0b10
The octal Value 0o2
The hexadecimal Value 0x2
![](https://www.fcukthecode.com/wp-content/uploads/2024/04/Screenshot-from-2024-04-05-20-07-15.png)
More Codes to Fcuk
- Armstrong Number
- Find the biggest even number
- Program to replace every element on right side
- Compute the frequency of the note
- Print all Possible Combinations from three Digits.
- Get number n and Compute n+nn+nnn
- Print Cube root of the given number
- Convert number into binary, octal and hexa
- Return maximum number of operations performed on array.
- Determine the encryption key
- Find the count of numbers having a prime number in their binary representation.
- Fibonacci Series up to given n numbers
- Help Alice find the route to her home
- Quantum Mechanics relation with quantum computing
- Unzipping Files using Python
- An Algorithm which accepts n integer values and calculates the average and prints it.
- How can Quantum Computing merge with Virtual Reality ? !
- Blockchain and Cryptocurrency. And their relations with Virtual Reality !!