Course Content
Programming Foundations Topics:
-Introduction to Python -Installing Python & Setting Up IDE -Variables, Data Types & Operators -Input & Output -Conditional Statements (if, else, elif) -Loops (for, while) -Functions and Parameters -Error Handling (Try/Except)
0/9
Web Development with Python
Topics: Introduction to Flask Introduction to Django Building Your First Web App Routing and Templates Handling Forms Connecting to Databases (SQLite/MySQL) User Authentication Deploying Python Apps Online
Data Science & AI
Topics: Python for Data Analysis Numpy & Pandas Basics Data Cleaning Techniques Data Visualization (Matplotlib, Seaborn) Introduction to Machine Learning (Scikit-Learn) Supervised vs Unsupervised Learning Linear Regression, KNN, and Decision Trees Basic Neural Networks
Automation & Scripting
Topics: Automating Files and Folders Sending Emails with Python Web Scraping (BeautifulSoup, Selenium) Working with Excel & CSV files Scheduling Tasks with Python Scripts PDF and Image Manipulation
Game Development
Topics: Intro to Pygame Creating a Game Window Sprite Movement & Collision Score Tracking Sound and Music in Games Game Projects: Pong, Snake, Flappy Bird
Career & Interview Prep
Topics: Common Python Coding Problems String & List Manipulation Challenges Recursion & Algorithm Practice Big-O Notation Basics Cracking Python Interview Questions Building a Python Portfolio
Advanced Python
Topics: Object-Oriented Programming (OOP) Working with APIs (REST APIs, JSON) Unit Testing with unittest File Handling (Text, JSON, Pickle) Decorators, Generators, and Lambda Functions Multithreading & Asynchronous Programming
Python Full Course

📝 Overview

In this lesson, you’ll learn how to get input from the user and display output using Python’s built-in functions. This helps make your programs interactive and dynamic.


🎯 What You’ll Learn

  • How to use the input() function to get user input

  • How to use the print() function to show output

  • How to combine and format text and variables

  • Common input/output (I/O) examples


📥 1. Getting User Input

Use the input() function to ask the user something:

python
name = input("What is your name? ")
print("Hello, " + name + "!")

🔍 What’s happening here?

  • The input() function displays a message and waits for the user to type something.

  • Whatever they type is stored as a string in the variable (name).


📤 2. Displaying Output

The print() function is used to show results or messages on the screen.

python
print("Welcome to Python!")

You can also print multiple things:

python
age = 18
print("You are", age, "years old.")

🔢 3. Type Conversion

Input is always a string, so if you need a number, convert it:

python
num1 = int(input("Enter a number: "))
num2 = float(input("Enter a decimal: "))
print("Total:", num1 + num2)
  • int() converts to integer

  • float() converts to float (decimal)


🎨 4. Formatting Output

You can use f-strings for cleaner output:

python
name = "Alice"
score = 95
print(f"{name} scored {score} points!")

This is more readable and easier to maintain.


🧠 Practice Task

Build a small form using input():

python
name = input("Enter your name: ")
course = input("What course are you taking? ")
print(f"Welcome {name}, enjoy learning {course}!")

⚠️ Common Mistakes to Avoid

  • Forgetting to convert input to number (int, float)

  • Using commas incorrectly in print()

  • Using + with different data types ("Age: " + 18 will cause error!)


Summary

  • input() gets data from the user

  • print() shows output

  • Always convert input if you expect a number

  • Use f-strings for clean formatting


⏭️ Next Lesson Preview

→ Conditional Statements in Python (if, else, elif)