FREE E LEARNING PLATFORM
☰ HOMEEXCEPTIONSOOPSJVMINTRO
×

Python Syllabus

AKTU Python Syllabus AKTU Python Freshers AKTU Python Advanced AKTU Pyton PYQ AKTU Pyton PYQS 2026 AKTU Pyton PYQS 2025 AKTU Pyton PYQS 2024

Unit I Introduction

Introduction to Python History of Python Features of Python Applications of Python Python Installation Python IDE Python Program Life Cycle First Python Program Blocks & Indentation Comments Keywords Identifiers Variables Input & Output Data Types Numeric Data Types Type Conversion Python Operators

Unit II Control Statements

if Statement if...else Statement Nested if elif Statement for Loop range() Function while Loop Nested Loops break Statement continue Statement pass Statement else with Loop

Unit III Complex Data Types

Strings String Operations String Methods String Built-in Functions Lists List Slicing List Methods List Built-in Functions Tuples Tuple Methods Dictionaries Dictionary Methods Dictionary Built-in Functions Python Built-in Functions Python Functions User Defined Functions Lambda Functions Recursive Functions

Unit IV File Handling

Introduction to File Handling open() read() readline() readlines() write() writelines() File Pointer seek() tell() File Modes

Unit V Packages & GUI

Modules Packages NumPy Pandas Matplotlib Tkinter Introduction Tkinter Widgets Button Widget Label Widget Entry Widget Frame Widget Menu Widget Event Handling Programming with IDE Tkinter Mini Project

Python Programs

100+ Solved Programs Pattern Programs File Programs Tkinter Programs

AKTU Questions

Unit I Questions Unit II Questions Unit III Questions Unit IV Questions Unit V Questions Viva Questions Python MCQs

Previous Papers

AKTU 2026 (Solved) AKTU 2025 (Solved) AKTU 2024 (Solved) AKTU 2023 (Solved) AKTU 2022 (Solved)
 


Python Variables

A variable is a name used to store a value in a Python program. Python does not require a variable to be declared with a data type before assigning a value. The type is determined automatically from the value.

Creating a Variable

A variable is created using the assignment operator =.

name = "Rahul"
age = 20
marks = 85.5

print(name)
print(age)
print(marks)
Output:
Rahul
20
85.5

Dynamic Typing

Python is dynamically typed. A variable can refer to values of different types during program execution.

x = 10
print(x)

x = "Python"
print(x)
Output:
10
Python

Multiple Variable Assignment

Multiple variables can be assigned values in a single statement.

a, b, c = 10, 20, 30

print(a)
print(b)
print(c)
Output:
10
20
30

Same Value to Multiple Variables

x = y = z = 100

print(x, y, z)
Output:
100 100 100

Variable Naming Rules

  • A variable name can contain letters, digits and underscore.
  • A variable name cannot start with a digit.
  • Spaces are not allowed in variable names.
  • Special characters such as @, # and $ are not allowed.
  • Python keywords cannot be used as variable names.
  • Variable names are case-sensitive.
student_name = "Amit"
age2 = 21
_total = 500

Case-Sensitive Variables

Python treats uppercase and lowercase letters as different.

name = "Rahul"
Name = "Amit"

print(name)
print(Name)
Output:
Rahul
Amit

Variables and Data Types

Variables can store different types of values such as integers, floating-point numbers, strings and Boolean values.

age = 20
price = 99.50
name = "Python"
passed = True

print(type(age))
print(type(price))
print(type(name))
print(type(passed))
Output:
<class 'int'>
<class 'float'>
<class 'str'>
<class 'bool'>

Changing a Variable Value

The value of a variable can be changed by assigning a new value.

score = 50
print(score)

score = 80
print(score)
Output:
50
80

Variables in Expressions

Variables can be used in mathematical expressions and calculations.

a = 10
b = 20

sum_value = a + b
product = a * b

print("Sum =", sum_value)
print("Product =", product)
Output:
Sum = 30

Product = 200

Deleting a Variable

The del keyword can be used to remove a variable.

x = 10
print(x)

del x

Local and Global Variables

A variable created inside a function is generally called a local variable. A variable created outside a function is generally called a global variable.

x = 10

def display():
    y = 20
    print(x)
    print(y)

display()
Output:
10
20

Constants

Python does not provide a special keyword for constants. By convention, constant names are written in uppercase letters.

PI = 3.14159
MAX_MARKS = 100

print(PI)
print(MAX_MARKS)

Checking Variable Type

The type() function returns the data type of a variable.

value = 25

print(type(value))
Output:
<class 'int'>
Key Point: Python variables are created through assignment. Their type is determined automatically, and a variable can later refer to a value of another type.