Answered step by step
Verified Expert Solution
Question
1 Approved Answer
How do I make this python code for partition number, start sector, size in sectors , end sector, capacity and none into a tabular format?#
How do I make this python code for partition number, start sector, size in sectors end sector, capacity and none into a 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
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
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 LB
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