The comments are in the screenshot.
Conclusion Questions:
1.
How
many characters are in this sentence? Does it matter whether Python is storing the string as one byte
per character or four bytes per character?
The total characters is each letter, space, and symbol used in the sentence. Python would need to store it as 1 byte so that the length of "hi" isn't 8.
2.
This
question asks you about something you have not learned. In fact, the question
is asking about details that go beyond what you will learn in this course.
However, wondering what is going on at a lower level of abstraction – and
talking about it – can be a useful strategy when learning about computing.
Describe
what you think occurs in memory when the following code is executed.
c would be "one" + " and " + "another", so it would be "one and another".
it would print 6-10 of c, so "d an".
It will remeber each letter's variable, and then combine parts (bytes) from each variable.
It will remeber each letter's variable, and then combine parts (bytes) from each variable.
No comments:
Post a Comment