Question: 29. Imagine you just received a bytes object b from a sender over the network. The bytes object holds the bits with hexadecimal shorthand 42
29. Imagine you just received a bytes object b from a sender over the network. The bytes object holds the bits with hexadecimal shorthand 42 41. If we run the command int.from_bytes (b, 'big'), we get the python int 16961. If we run the command b.decode( ASCII'), we get the python str 'BA' Describe how you could determine whether it is a raw binary number or ASCII text that is meant to be stored in the bytes object. In other words, did the user mean to send the int or the str? Be creative - there are multiple ways you might know. But you must think outside the bytes object. The goal is critical thinking, not remembering some fact from class or the book
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
