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 Comments

Comments are non-executable statements written in a Python program to explain the code. Python ignores comments during program execution. Comments make programs easier to understand, read and maintain.

Why Use Comments?

  • To explain the purpose of a section of code.
  • To make the program easier to understand.
  • To document important information about the program.
  • To temporarily disable a line of code during testing.

Single-Line Comments

A single-line comment starts with the # symbol. Everything written after # on that line is treated as a comment.

# This is a comment
print("Hello Python")
Output:
Hello Python

Comment After a Statement

A comment can also be written on the same line after a Python statement.

x = 10       # Store 10 in x
print(x)     # Display the value
Output:
10

Comments in Multiple Lines

Python does not have a separate multi-line comment symbol. Multiple single-line comments can be written by using # on each line.

# Calculate the area of a circle
# radius is given by the user
# Formula: area = 3.14 * radius * radius

radius = 5
area = 3.14 * radius * radius
print(area)
Output:
78.5

Using Triple Quotes

Triple-quoted strings using ''' or """ can span multiple lines. They are mainly used for docstrings in Python. They should not be treated as the normal way of writing comments.

"""
This is a multi-line string.
It can contain several lines.
"""

print("Python")
Output:
Python

Comments in Functions

Comments can be used to describe what a function does.

def add(a, b):
    # Return the sum of two numbers
    return a + b

print(add(10, 20))
Output:
30

Commenting Out Code

A line can be temporarily disabled by placing # before it.

print("Start")

# print("This line will not execute")

print("End")
Output:
Start
End

Important Points

  • Use # for a single-line comment.
  • Python does not execute comments.
  • Comments improve code readability.
  • Comments can be written before or after a statement.
  • Use meaningful comments that explain the code clearly.
Key Point: Comments are used to explain Python code and are ignored during program execution. The # symbol is the standard way to write a comment in Python.