What data type would you use to represent the following?
Write an example assignment statement for each.
Assume x = 'alphabet'
How could you get the b
?
Generally speaking, one can view strings as lists of characters, but …
Can you predict what the code segments do to the value of x
and explain why they work that way?
Can you predict what the code segments do to the values of x
and y
and explain why they work that way?
How would similar code segments work on integers, floats, dictionaries and tuples?
Draw the name-object diagram for the following code:
Note that the upper()
method creates a string with all uppercase letters.
Strings are immutable. The upper()
method returns a new string.
Which of the following assertions makes the most sense to you?
“[Technology is] essentially amoral, a thing apart from values, an instrument which can be used for good or ill.” — R. Buchanan, Technology and Social Progress, 1965.
“Embedded in every tool is an ideological bias, a predisposition to construct the world as one thing rather than another, to value one thing over another, to amplify one sense or skill or attitude more loudly than another.” — N. Postman, Technopoly: The Surrender of Culture to Technology, 1992.