Input / Output: Talk to Your Code! 📤
Input is what YOU give the computer. Output is what the computer shows BACK. It’s a conversation — between you and your program!
Two Sides of Every Conversation!
Think of your program as a friend — it asks questions and gives answers!
INPUT — You Give Info IN!
Input is any information you give to the program. Typing your name, clicking a button, pressing a key — all input!
# User types: Sara
# name = “Sara” ✅
OUTPUT — Program Shows Info OUT!
Output is anything the program shows back to you. Text on screen, sounds, images — all output!
# Output shows on screen:
Hello, Sara! 👋
You Use Input/Output All Day Long!
Every device around you uses input and output!
Keyboard & Screen
You type on the keyboard (input) and the computer shows the result on screen (output). Every word you type!
Video Games
You press buttons (input) and the character moves on screen (output). Every game works this way!
Google Search
You type a question (input) and Google shows you results (output). Millions of times a day!
ATM Machine
You enter your PIN and amount (input) and the ATM gives you cash and a receipt (output)!
Interactive Program Simulator!
Choose a program — type your input — see the output instantly!
print() and input() — Learn Both!
These two functions handle all input and output in Python!
print() — Show Output!
Use print() to show any information on the screen. Text, numbers, variables — anything you want the user to see!
print(score)
print(“You scored:”, score)
# All show on screen! ✅
input() — Get Input!
Use input() to ask the user a question and wait for their answer. Whatever they type gets stored in a variable!
age = input(“Age? “)
print(“Hi”, name)
# Uses both together! 🎉
3 Mistakes to Watch Out For!
Every beginner makes these — now you won’t have to!
4 questions · pick an answer to check!
⭐ Remember This!
Input = information you give TO the program (typing, clicking)
Output = information the program shows BACK to you
Use print() to show output on the screen
Use input() to get input — always returns text!
