Decimal to Binary Conversion - Learn Engineering

All the news and updates relevant to Engineering. You can also Write a post here

Breaking

Friday, June 19, 2020

Decimal to Binary Conversion

python-mini

Question

To Convert decimal number to binary number.

Sample TestCaseExpected Output

Enter a decimal number : 3                                                  Equivalent binary number : 0b11




Answer


number=int(input("Enter a Decimal number : "))
print("Equivalent Binary number :",bin(number))

No comments:

Post a Comment