Strings & I/O: Misconceptions
≈ 25 minMisconceptions
Test common incorrect explanations against definitions, conservation rules and evidence.
This extension applies that lens specifically to Strings & I/O.
A string is text. You can join strings with + (concatenation) and measure them with len():
greeting = "Hello, " + name n = len("hello") # 5
Strings have handy methods: "cape town".upper() → "CAPE TOWN", " hi ".strip() → "hi".
print(...) sends text to the screen; input(...) reads a line the user types (returns a string).
Python Foundations — Misconceptions: Write a function greet(name) that returns the string "Hello, " followed by the name. For example greet("Zanele") returns "Hello, Zanele".
Runs in your browser. Charts (matplotlib) are not supported — use print-based output.
Python Foundations — Misconceptions: Given s = "cape town", create a variable shout holding the uppercase version ("CAPE TOWN").
Runs in your browser. Charts (matplotlib) are not supported — use print-based output.
Python Foundations — Misconceptions: What does len("Caelum") return?
Name the original topic being extended by this misconceptions lesson.
Which statement is the best evidence-led starting point for Strings & I/O: Misconceptions?

