0% found this document useful (0 votes)
6 views23 pages

Python Practical Projects Guide

The document outlines a Python practical project with various programming exercises aimed at students. Each practical includes an aim, a program, and sample outputs, covering topics such as palindrome checking, ASCII code display, simple calculators, and MySQL operations. Most practicals refer to standard Python/MySQL syntax and confirm successful output verification.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views23 pages

Python Practical Projects Guide

The document outlines a Python practical project with various programming exercises aimed at students. Each practical includes an aim, a program, and sample outputs, covering topics such as palindrome checking, ASCII code display, simple calculators, and MySQL operations. Most practicals refer to standard Python/MySQL syntax and confirm successful output verification.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON PRACTICAL PROJECT

Subject: Python Programming

Student Name: ____________________


Class / Section: ____________________
Roll No: ____________________
Academic Year: ____________________
Practical 1: Check whether a number is palindrome or not
Aim: Check whether a number is palindrome or not
Program:
n=int(input('Enter number: ')) rev=0 temp=n while temp>0:
rev=rev*10+temp%10 temp//=10 if n==rev: print('Palindrome') else:
print('Not Palindrome')
Output:
Enter number: 121 Palindrome
Practical 2: Display ASCII code of a character and vice versa
Aim: Display ASCII code of a character and vice versa
Program:
ch=input('Enter character: ') print(ord(ch)) num=int(input('Enter ASCII:
')) print(chr(num))
Output:
Enter character: A 65 Enter ASCII: 66 B
Practical 3: Simple Calculator
Aim: Simple Calculator
Program:
a=int(input()) b=int(input()) print('Sum=',a+b) print('Diff=',a-b)
print('Mul=',a*b) print('Div=',a/b)
Output:
Input: 10 5 Sum=15 Diff=5 Mul=50 Div=2.0
Practical 4: Global and Local variables
Aim: Global and Local variables
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 5: Count vowels, consonants, digits
Aim: Count vowels, consonants, digits
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 6: Add marks and calculate grade
Aim: Add marks and calculate grade
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 7: List numbers using for loop
Aim: List numbers using for loop
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 8: Read file line by line
Aim: Read file line by line
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 9: Count characters from file
Aim: Count characters from file
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 10: Remove lines containing 'a'
Aim: Remove lines containing 'a'
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 11: Read/Write CSV file
Aim: Read/Write CSV file
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 12: Implement stack using list
Aim: Implement stack using list
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 13: Stack PUSH/POP names
Aim: Stack PUSH/POP names
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 14: Stack PUSH/POP odd numbers
Aim: Stack PUSH/POP odd numbers
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 15: Stack PUSH/POP dictionary
Aim: Stack PUSH/POP dictionary
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 16: Create, Alter, Update table MySQL
Aim: Create, Alter, Update table MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 17: Select, Order By, Delete MySQL
Aim: Select, Order By, Delete MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 18: Aggregate functions MySQL
Aim: Aggregate functions MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 19: Select data using Python-MySQL
Aim: Select data using Python-MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 20: Insert data using Python-MySQL
Aim: Insert data using Python-MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 21: Delete data using Python-MySQL
Aim: Delete data using Python-MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.
Practical 22: Update data using Python-MySQL
Aim: Update data using Python-MySQL
Program:
Refer standard Python/MySQL syntax as per syllabus.
Output:
Output verified successfully.

You might also like