← Python Programming learning pathPython Programming · Module 3 of 10
Input, output and operators
Read input from users and calculate with arithmetic, comparison and logical operators.
📖 Key ideas
- input() reads text typed by the user; it always returns a string.
- Arithmetic: + - * / // (floor division) % (remainder) ** (power).
- Comparison: == != < > <= >= give True or False.
- Logical: and, or, not combine conditions.
- f-strings format text: f"Hi {name}".
💡 Real-life example: A billing counter: input is the item price, operators calculate the total, output prints the bill.
input()Reads text from the user
%Remainder after division
**Power operator
f-stringText with {values} inside