← Python Programming learning path
Python Programming · Module 3 of 10

Input, output and operators

Read input from users and calculate with arithmetic, comparison and logical operators.

📖 Key ideas

  1. input() reads text typed by the user; it always returns a string.
  2. Arithmetic: + - * / // (floor division) % (remainder) ** (power).
  3. Comparison: == != < > <= >= give True or False.
  4. Logical: and, or, not combine conditions.
  5. 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