Answered step by step
Verified Expert Solution
Question
1 Approved Answer
how do i put this python code into tabular format? # Input partial hex string hexstring = ( input ( Enter the hex string:
how do i put this python code into tabular format? # Input partial hex string
hexstring inputEnter the hex string: # this is the input statement that you should have.
partition hexstring: #Slices out partition
startinglbaaddress partition: #Slices out the starting LBA Address
sizeinsectors partition: #Slices out the size in sectors
startingchsaddress
partitiontype
endingchsaddress C
#startinglbaaddress
#Input sectors
#sizeinsectors
lestartinglbaaddress startinglbaaddress: startinglbaaddress: startinglbaaddress: startinglbaaddress:
lesizeinsectors sizeinsectors: sizeinsectors: sizeinsectors: sizeinsectors:
# change hex string to bytes
decimalforlestartinglbaaddress intlestartinglbaaddress,
decimalforlesizeinsectors intlesizeinsectors
capacity decimalforlesizeinsectors
#print for results
printPartition :
#printStarting CHS Address: startingchsaddress
#printPartition Type: partitiontype
#printEnding CHS Address: endingchsaddress
#printStarting LBA Address: startinglbaaddress
#printSize in sectors: sizeinsectors
#printLE Starting LBA Address: lestartinglbaaddress
#printLE Size in sectors: lesizeinsectors
printThe decimal for the LE Starting LBA Address: decimalforlestartinglbaaddress
printThe decimal for the LE Size in sectors: decimalforlesizeinsectors
print Capacity capacity
# Input partial hex string
hexstring inputEnter the hex string:
partition hexstring: #Slices out partition
startinglbaaddress partition: #Slices out the starting LBA Address
sizeinsectors partition: #Slices out the size in sectors
startingchsaddress C
partitiontype
endingchsaddress AA
#startinglbaaddress
#Input sectors
#sizeinsectors
lestartinglbaaddress startinglbaaddress: startinglbaaddress: startinglbaaddress: startinglbaaddress:
lesizeinsectors sizeinsectors: sizeinsectors: sizeinsectors: sizeinsectors:
# change hex string to bytes
decimalforlestartinglbaaddress intlestartinglbaaddress,
decimalforlesizeinsectors intlesizeinsectors
capacity decimalforlesizeinsectors
#print for results
printPartition :
#printStarting CHS Address: startingchsaddress
#printPartition Type: partitiontype
#printEnding CHS Address: endingchsaddress
#printStarting LBA Address: startinglbaaddress
#printSize in sectors: sizeinsectors
#printLE Starting LBA Address: lestartinglbaaddress
#printLE Size in sectors: lesizeinsectors
printThe decimal for the LE Starting LBA Address: decimalforlestartinglbaaddress
printThe decimal for the LE Size in sectors: decimalforlesizeinsectors
print Capacity capacity
# Input partial hex string
hexstring inputEnter the hex string:
partition hexstring: #Slices out partition
startinglbaaddress partition: #Slices out the starting LBA Address
sizeinsectors partition: #Slices out the size in sectors
startingchsaddress AB
partitiontype
endingchsaddress A
#startinglbaaddress
#Input sectors
#sizeinsectors
lestartinglbaaddress startinglbaaddress: startinglbaaddress: startinglbaaddress: startinglbaaddress:
lesizeinsectors sizeinsectors: sizeinsectors: sizeinsectors: sizeinsectors:
# change hex string to bytes
decimalforlestartinglbaaddress intlestartinglbaaddress,
decimalforlesizeinsectors intlesizeinsectors
capacity decimalforlesizeinsectors
#print for results
printPartition :
#printStarting CHS Address: startingchsaddress
#printPartition Type: partitiontype
#printEnding CHS Address: endingchsaddress
#printStarting LBA Address: startinglbaaddress
#printSize in sectors: sizeinsectors
#printLE Starting LBA Address: lestartinglbaaddress
#printLE Size in sectors: lesizeinsectors
printThe decimal for the LE Starting LBA Address: decimalforlestartinglbaaddress
printThe decimal for the LE Size in sectors: decimalforlesizeinsectors
print Capacity capacity
# Input partial hex string
hexstring inputEnter the hex string:
partition hexstring: #Slices out partition
startinglbaaddress partition: #Slices out the starting LBA Address
sizeinsectors partition: #Slices out the size in sectors
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started