Foundations — Input with `input()` — always returns string, conversion needed
This page assumes you know nothing. We will build every word, function, and symbol the parent note uses, in an order where each piece stands on the one before it. Look at the pictures — they carry the meaning.
1. A character — the smallest piece
Look at the figure. The keyboard key 5 produces the character '5'. That character is a tiny picture of a five — not the quantity five.

Why the topic needs this: if you don't see that '5' (drawing) and 5 (quantity) are different things, nothing else about input() will make sense.
2. A string — characters in a row

In the picture, "42" is a row of two drawings: the character '4' then the character '2'. Together they still form a picture, not the quantity forty-two.
- The quotes
"..."are the fence that says "everything inside is text." "42"and42look almost the same on paper but are different kinds of thing.
Why the topic needs this: input() always gives you a str — so you must know exactly what a string is before you can convert it.
See Variables and Data Types for the full family of types.
3. An integer and a float — real quantities

The picture shows a number line. An int lands exactly on a marked tick (3). A float can land between ticks (3.14). Both are quantities you can do arithmetic with — unlike a string, which is just ink.
Why the topic needs this: these are the targets of conversion. You read a string, then aim it at int (whole) or float (decimal) depending on the data's meaning.
More at Variables and Data Types.
4. A variable and the = sign
Why the topic needs this: the core pattern name = input(...) uses = to catch what the microphone recorded. Without understanding the box, x = input() is mysterious.
5. A function and its call name(...)

The picture shows a machine box. int("42") feeds the string "42" into the int machine; out comes the quantity 42. The round brackets (...) are the mouth of the machine.
Functions the parent note uses:
input(prompt)— the microphone machine: waits, records, returns astr.int(s)— the reader machine: turns a digit-string into a whole quantity.float(s)— turns a decimal-string into a decimal quantity.print(...)— the speaker machine: shows a value on screen. See print() Function.type(...)— the label reader: tells you what kind of thing a value is.
Why the topic needs this: every line in the parent note is a function call. int(input("Age: ")) is one machine feeding another — the microphone's output goes straight into the reader.
Conversion machines are covered deeply in Type Conversion (Casting).
6. Nesting — a machine inside a machine
Why the topic needs this: the recommended one-line pattern value = int(input(prompt)) is exactly this nesting. You must see the order: microphone first, reader second, then store in the box.
7. The + and * symbols — meaning depends on type
| Expression | Types | Result | Job done |
|---|---|---|---|
3 + 4 |
int + int | 7 |
add |
"3" + "4" |
str + str | "34" |
join |
"ab" * 3 |
str * int | "ababab" |
repeat |
"ab" * "3" |
str * str | error | undefined |
Why the topic needs this: this is the exact trap the parent note warns about. "3" + "4" = "34" because both are strings. Understanding overloading explains why forgetting to convert gives 34 instead of 7.
Explored further in Operators in Python and String Concatenation vs Arithmetic.
8. An error / exception
Why the topic needs this: conversion can fail. Knowing that a bad string raises ValueError tells you why real programs guard input with Exceptions and try-except.
Prerequisite map
Everything above feeds into the parent topic: the main note.
Equipment checklist
Test yourself — cover the right side and answer:
What is a character?
What is a string (str)?
"42"; it is text, not a number.How does '5' (the character) differ from 5 (the quantity)?
'5' is a drawing of five; 5 is the actual amount you can do math with.What is an int vs a float?
int is a whole-number quantity (42); float is a decimal-number quantity (3.14).What does the = sign do in Python?
←.What does name(...) do?
In int(input("x")), which runs first?
input("x") runs first; its string result is then fed to int.What does + do for two strings vs two numbers?
"3"+"4"="34"); for numbers it adds (3+4=7).What does "ab" * 3 produce, and why does "ab" * "3" fail?
"ababab" (repeat); the second fails because you can't multiply a string by a string (TypeError).What is a ValueError?
int() gets a string it can't convert, e.g. int("twenty").