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 Numeric Data Types

Python provides three built-in numeric data types: int, float and complex. These data types are used to represent whole numbers, decimal numbers and complex numbers.

Types of Numeric Data

Data Type Description Example
int Whole numbers without a decimal point 25
float Numbers containing a decimal point 25.5
complex Numbers containing real and imaginary parts 3 + 4j

1. Integer (int)

The int data type represents whole numbers. Integers can be positive, negative or zero.

a = 25
b = -10
c = 0

print(a)
print(b)
print(c)
Output:
25
-10
0

Checking Integer Type

number = 100

print(type(number))
Output:
<class 'int'>

Large Integers

Python integers can represent very large whole numbers. There is no fixed 32-bit or 64-bit integer limit for normal Python integers; the practical limit depends on available memory.

number = 123456789012345678901234567890

print(number)
Output:
123456789012345678901234567890

2. Floating-Point (float)

The float data type represents numbers containing a decimal point. It is commonly used for measurements, prices, percentages and other decimal calculations.

price = 99.50
temperature = 36.5
percentage = 85.75

print(price)
print(temperature)
print(percentage)
Output:
99.5
36.5
85.75

Checking Float Type

value = 25.75

print(type(value))
Output:
<class 'float'>

Scientific Notation

Python allows floating-point numbers to be written using scientific notation. The letter e or E represents a power of 10.

x = 2.5e3
y = 4.2e-2

print(x)
print(y)
Output:
2500.0
0.042

3. Complex Numbers (complex)

A complex number consists of a real part and an imaginary part. Python uses j to represent the imaginary part.

z = 3 + 4j

print(z)
print(type(z))
Output:
(3+4j)
<class 'complex'>

Real and Imaginary Parts

The real and imag attributes can be used to access the real and imaginary parts of a complex number.

z = 5 + 3j

print("Real part:", z.real)
print("Imaginary part:", z.imag)
Output:
Real part: 5.0
Imaginary part: 3.0

Arithmetic Operations on Integers

Python supports several arithmetic operations on numeric values.

a = 10
b = 3

print("Addition:", a + b)
print("Subtraction:", a - b)
print("Multiplication:", a * b)
print("Division:", a / b)
print("Floor Division:", a // b)
print("Modulus:", a % b)
print("Power:", a ** b)
Output:
Addition: 13
Subtraction: 7
Multiplication: 30
Division: 3.3333333333333335
Floor Division: 3
Modulus: 1
Power: 1000

Arithmetic Operations on Float Values

a = 10.5
b = 2.5

print(a + b)
print(a - b)
print(a * b)
print(a / b)
Output:
13.0
8.0
26.25
4.2

Arithmetic Operations on Complex Numbers

Complex numbers support addition, subtraction, multiplication and division.

z1 = 2 + 3j
z2 = 4 + 5j

print("Addition:", z1 + z2)
print("Subtraction:", z1 - z2)
print("Multiplication:", z1 * z2)
Output:
Addition: (6+8j)
Subtraction: (-2-2j)
Multiplication: (-7+22j)

Using abs() with Numeric Values

The abs() function returns the absolute value of a number. For a complex number, it returns its magnitude.

print(abs(-25))
print(abs(-12.5))

z = 3 + 4j
print(abs(z))
Output:
25
12.5
5.0

Using pow()

The pow() function can be used to calculate the power of a number.

print(pow(2, 5))
print(pow(10, 2))
Output:
32
100

Using round()

The round() function is used to round a floating-point value.

number = 12.6789

print(round(number))
print(round(number, 2))
Output:
13
12.68

Comparing Numeric Values

Numeric values can be compared using comparison operators such as ==, !=, >, <, >= and <=.

a = 20
b = 10

print(a > b)
print(a == b)
print(a != b)
Output:
True
False
True

Checking Numeric Data Types

The type() function can be used to identify the numeric data type of a value.

a = 10
b = 10.5
c = 2 + 3j

print(type(a))
print(type(b))
print(type(c))
Output:
<class 'int'>
<class 'float'>
<class 'complex'>

Key Differences

Feature int float complex
Example 10 10.5 2 + 3j
Decimal Part No Yes May contain real and imaginary parts
Imaginary Part No No Yes
Common Use Counting and whole numbers Measurements and decimal calculations Complex mathematical calculations

Important Points

  • Python has three main built-in numeric data types: int, float and complex.
  • int represents whole numbers.
  • float represents decimal numbers.
  • complex represents numbers with real and imaginary parts.
  • Python uses j for the imaginary part of a complex number.
  • The type() function can be used to check the type of a numeric value.
  • Numeric values can be used with arithmetic and comparison operators.
Key Point: Python provides int, float and complex as its built-in numeric data types. These types allow Python programs to perform integer, decimal and complex-number calculations.