Python Advanced Interview Questions

Menu

  • Home
  • Services
  • Conuter
  • Information
  • Projects
  • Reviews
  • Blog
  • Home
  • Features
  • _Multi DropDown
  • __DropDown 1
  • __DropDown 2
  • __DropDown 3
  • _ShortCodes
  • _SiteMap
  • _Error Page
  • Documentation
  • _Web Documentation
  • _Video Documentation
  • Download This Template

Recent Blog Posts

Lorem Ipsum has been the industry's standard dummy text.

Showing posts with the label convert integer to decimalShow all
Question 1 : Python (Integer to decimal,octal,hexadecimal, binary)

Question 1 : Python (Integer to decimal,octal,hexadecimal, binary)

Arpit dadhich June 06, 2020 solution

Answer:: def  print_formatted(number):     width= len ( bin (n)[ 2 :])      for  i  in   range ( 1 ,number+ 1 ):           print ( str (i).rjust(widt…

Popular Posts

Projects

3/News/post-list

Subscribe Us

Categories

Tags

  • array
  • C graphics
  • Caesar Cipher
  • capital first letter
  • Capitalize
  • catalan number
  • chocolate feast
  • codechef
  • codechef solution august challenge
  • compare two linked lists
  • conditional statement
  • convert integer to binary
  • convert integer to decimal
  • convert integer to hexadecimal
  • convert integer to octal
  • data structure
  • dynamic programming
  • Eof errror
  • fibonacci number
  • Gfg Solution
  • Hacker Rank capitalize
  • hackerrank
  • hackerrank solution
  • Hackerrank Solution (Problem Solving)
  • Hexadecimal To Decimal
  • in hindi
  • keyword
  • left rotation
  • linked list
  • mithai feast
  • palindrom series
  • print linked list
  • program
  • python
  • python programming
  • Queue
  • remove duplicate
  • remove duplicate in linked list
  • solution
  • stack
  • Tcs question answer
Powered by Blogger

Report Abuse

Python code to check whether given hexadecimal number is equal to the provided decimal number

  • Get link
  • Facebook
  • X
  • Pinterest
  • Email
  • Other Apps
by Arpit dadhich May 19, 2022
  Python code for converting hexadecimal to decimal numbers And Check whether given hex number is equal to provided decimal number :   # Make a dictionary of Hexadecimal to decimal conversion table HexToDecimalConvTable = { '0' : 0 , '1' : 1 , '2' : 2 , '3' : 3 , '4' : 4 , '5' : 5 , '6' : 6 , '7' : 7 , '8' : 8 , '9' : 9 , 'A' : 10 , 'B' : 11 , 'C' : 12 , 'D' : 13 , 'E' : 14 , 'F' : 15 }   # Enter some hexadecimal number (strip remmove space and upper convert into Capital Latter) hexadecimalNumber = input ( "Enter the hexadecimal number: " ). strip (). upper ()   #Enter the provided decimal number decimalNumber = int ( input ( "Enter provided decimal number: " )) decimal = 0   #computing max power value power = len ( hexadecimalNumber ) - 1   for digit in hexadecimalNumber :      decimal += HexToDecimalConvTable [ digit ]* 16 **...
Post a Comment
Read more

Search This Blog

Blog Archive

  • May 20221
  • September 20206
  • August 20207
  • July 202025
  • June 202010
  • Home
  • About Us
  • Privacy Policy
  • Contact Us
Created By Themes | Distributed By Blogger
  • Home
  • About
  • Contact Us