About 5,710,000 results
Open links in new tab
  1. Base Converter in Python - Stack Overflow

    Nov 14, 2014 · I am writing a program to convert in any base to base 10 in Python. The code for the program is shown below. print("Enter the number you want to convert to base 10: ") number = input() """length o...

  2. python - Converting bases using int () - Stack Overflow

    Feb 8, 2018 · int(i, 3) converts a string representation of a base 3 number to base 10. For example, int('e5e2', 16) returns 58850, which is the base 10 representation of e5e2 –

  3. 5 Best Ways to Convert Integer to Base N in Python

    Feb 18, 2024 · This article describes five methods to convert an integer from base 10 to any other base ‘n’. For example, given the integer 42, and the desired base 5, the output should be the string ‘132’, representing the base-5 equivalent of the decimal number 42.

  4. Base conversion in Python - mathspp

    This article shows how to do base conversions in Python with the built-in int, how to write integer literals in other bases, and how to do base conversions in general. In this article I'll assume you know what a number base is and how there are multiple number bases.

  5. Convert Decimal to Other Bases in Python - GeeksforGeeks

    Jun 22, 2023 · Convert Decimal to Other Bases Using string formatting. We can use string formatting to convert a decimal number to other bases. Here is an example of how to use string formatting to convert a decimal number to binary, octal, and hexadecimal:

  6. Python - Homework - Converting Any Base to Any Base

    May 9, 2016 · I'm trying to make a program to convert a number in any base to another base of the user's choice. The code I have so far goes like this: innitvar = float(raw_input("Please enter a number: ")) basevar = int(raw_input("Please enter the base that your number is in: ")) convertvar = int(raw_input("Please enter the base that you would like to ...

  7. Convert Decimal Number to Any Base in Python - aruljohn.com

    Feb 18, 2025 · This article will show you how to use Python to convert decimal numbers to binary, octal, hexadecimal and other bases up to base 36 and vice versa. Convert Decimal number to any other base in Python Table of Contents

  8. How to transform numeric base in Python | LabEx

    Learn efficient Python techniques for converting numeric bases, exploring built-in functions and practical methods to transform numbers between decimal, binary, hexadecimal, and octal representations.

  9. Python Tutorial: Base Conversion for Integers in Python

    Oct 22, 2024 · To convert a number from binary, octal, or hexadecimal back to decimal, you can use the int() function, which takes two arguments: the string representation of the number and the base of that number.

  10. All Number System Conversion Python Project - Engineer's Planet

    Jan 16, 2024 · The Numerical Base converter In Python is a simple project developed using Python. The project contains a base conversion system. The user can enter any number and convert them to any number systems(like decimal to binary, binary to octal, etc.).

  11. Some results have been removed
Refresh