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 Input and Output

Input and output are basic operations in Python. Input is used to accept data from the user, while output is used to display information on the screen.


1. Python Output Using print()

The print() function is used to display text, values, variables and expressions on the screen.

print("Hello Python")
print(100)
print(10 + 20)

Output:

Hello Python
100
30

2. Printing Variables

name = "Aadarsh"
age = 42

print(name)
print(age)

Output:

Aadarsh
42

3. Printing Multiple Values

Multiple values can be passed to print() by separating them with commas.

name = "Aadarsh"
age = 42

print("Name:", name)
print("Age:", age)

Output:

Name: Aadarsh
Age: 42

4. The sep Parameter

The sep parameter specifies the separator between multiple values.

print("Python", "Java", "C++", sep=" | ")

Output:

Python | Java | C++

5. The end Parameter

By default, print() moves to a new line after displaying the output. The end parameter can change this behaviour.

print("Hello", end=" ")
print("Python")

Output:

Hello Python

6. Formatted Output Using f-Strings

f-strings provide a simple way to insert variables inside a string.

name = "Aadarsh"
marks = 85

print(f"Name: {name}")
print(f"Marks: {marks}")

Output:

Name: Aadarsh
Marks: 85

7. Taking Input Using input()

The input() function is used to accept data from the user. The value returned by input() is always a string.

name = input("Enter your name: ")
print("Hello", name)

Example:

Enter your name: Rahul
Hello Rahul

8. Taking Integer Input

Since input() returns a string, use int() when an integer is required.

age = int(input("Enter your age: "))
print("Age:", age)

Example:

Enter your age: 20
Age: 20

9. Taking Floating-Point Input

Use float() to convert the input into a floating-point number.

price = float(input("Enter price: "))
print("Price:", price)

Example:

Enter price: 99.50
Price: 99.5

10. Taking Multiple Inputs

Multiple values can be accepted using split().

a, b = input("Enter two numbers: ").split()

print("First:", a)
print("Second:", b)

Example:

Enter two numbers: 10 20
First: 10
Second: 20

11. Taking Multiple Integer Inputs

The map() function can be used with int() to convert multiple inputs into integers.

a, b = map(int, input("Enter two numbers: ").split())

print("Sum =", a + b)

Example:

Enter two numbers: 10 20
Sum = 30

12. Taking Multiple Floating-Point Inputs

x, y = map(float, input("Enter two values: ").split())

print("Total =", x + y)

Example:

Enter two values: 10.5 20.5
Total = 31.0

13. Input as a List

Multiple values can be converted into a list using split().

numbers = input("Enter numbers: ").split()

print(numbers)

Example:

Enter numbers: 10 20 30 40
['10', '20', '30', '40']

To create a list of integers:

numbers = list(map(int, input("Enter numbers: ").split()))

print(numbers)

Output:

Enter numbers: 10 20 30 40
[10, 20, 30, 40]

14. Escape Characters in Output

Escape characters are used to control the formatting of output.

Escape Character Meaning
\n New line
\t Tab
\\ Backslash
\" Double quotation mark
\' Single quotation mark
print("Hello\nPython")
print("Name\tAge")

Output:

Hello
Python
Name    Age

15. Using format() for Output

The format() method can also be used to insert values into strings.

name = "Rahul"
marks = 90

print("Name: {}, Marks: {}".format(name, marks))

Output:

Name: Rahul, Marks: 90

16. Input and Output Example

The following program accepts two numbers and displays their sum.

a = int(input("Enter first number: "))
b = int(input("Enter second number: "))

sum_value = a + b

print("Sum =", sum_value)

Example:

Enter first number: 15
Enter second number: 25
Sum = 40

17. Important Points

  • input() accepts data from the user.
  • input() returns a string by default.
  • Use int() for integer input.
  • Use float() for decimal input.
  • print() displays output on the screen.
  • sep controls the separator between printed values.
  • end controls what is printed after the output.
  • split() is useful for taking multiple inputs.
  • map() can be used to convert multiple input values.
Exam Point: In Python, input() always returns a string. Therefore, type conversion such as int() or float() is required when numerical calculations are performed.