WELCOME TO

Python Workshop Day 1

Learn Python Programming from scratch with practical examples, coding exercises and mini project development. This workshop is specially designed for complete beginners.

Start Learning

Python Installation

Step-by-Step Installation Process

Step 1

Open Google and search for Python Download.

Step 2

Open the official website: https://www.python.org

Step 3

Download the latest Python version.

Step 4

During installation enable: "Add Python to PATH"

Step 5

Verify installation:

python --version

Student Exercises

  • Install Python in your system.
  • Verify Python version using Command Prompt.

Where Python is Used

Applications of Python

Web Development

Python is used to build backend applications and APIs.

Artificial Intelligence

Python is used in AI and Machine Learning applications.

Automation

Python helps automate repetitive software tasks.

Data Science

Python is used for data analysis and visualization.

First Program in Python

Create and Run Your First Python Program

Step 1

Open Notepad.

Step 2

Type the following program:

print("Hello World")

Step 3

Save the file as: hello.py

Step 4

Open Command Prompt.

Step 5

Navigate to file location:

cd Desktop

Step 6

Run the program:

python hello.py

Output

Hello World

Student Exercises

  • Create a Python program to print your name.
  • Create a Python program to print your college name.

Variables and Data Types

Understanding Variables

Variables are used to store data in Python applications.

Data type represents the type of value stored in a variable.

name = "Ravi"

age = 22

salary = 25000.50

print(name)
print(age)
print(salary)

Student Exercises

  • Create variables for student name, age and course.
  • Create variables for product name and product price.

Input and Output Operations

Reading Data From User

String Input Example

name = input("Enter Your Name: ")

print("Welcome", name)

Integer Input Example

age = int(input("Enter Age: "))

print(age)

Student Exercises

  • Read employee name from user and display it.
  • Read student age from user and print the output.

Arithmetic Operators

Mathematical Operations

a = 10
b = 5

print(a + b)

print(a - b)

print(a * b)

print(a / b)

Student Exercises

  • Read two numbers and calculate addition.
  • Read two numbers and calculate multiplication.

Calculator Program

Simple Python Calculator

num1 = int(input("Enter First Number: "))

num2 = int(input("Enter Second Number: "))

print("Addition:", num1 + num2)

print("Subtraction:", num1 - num2)

print("Multiplication:", num1 * num2)

print("Division:", num1 / num2)

Student Exercises

  • Create a calculator program for addition and subtraction only.
  • Create a calculator program using three numbers.

Mini Project

Student Marks Management System

This program accepts student marks, calculates total and average, and displays the final result.

name = input("Enter Student Name: ")

m1 = int(input("Enter Marks 1: "))

m2 = int(input("Enter Marks 2: "))

m3 = int(input("Enter Marks 3: "))

total = m1 + m2 + m3

average = total / 3

print("Student Name:", name)

print("Total Marks:", total)

print("Average:", average)

Student Exercises

  • Modify the Student Marks program for 5 subjects.
  • Add percentage calculation to the program.

Day-2