Python Program List with Source Code

 Python Program List with Source Code

A. - Practical Exam Question Bank


  1.  Write a Python program to find number is greater or smaller from list which is named mylist. Write manual code
  2. Demonstrate various operations on String and tuple. String is " Hello friends how are you", Tuple name is MyTuple
  3. Create a File newfile.txt. Write four to six lines in your file and perform following, number of line in file, number of words in line, number of vowels in file
  4. Python program to check the student’s Grades in Examination based on following information. If Percentage is >80 “Outstanding”, if Percentage>=70 and <80 “Distinction”, if percentage>=60 and <70 “First Class”, percentage >=50 and <60 “Second Class”, percentage >=40 and <50 “Pass Class”, percentage <40 “Fail
  5.  Write Python code to use array package and perform, create one-D array, two-D array, perform addition, multiplication and product of array
  6. Write python program to create class name Student. Enter student names, class, rollno, Marks of two subjects and display total and average marks of student
  7. Write a python program to calculate net salary of employee based on following data. Basic salary=16500, HRA=67%, DA=137%, TA=2%, NAAC=1500, Deduction- Professional Tax=200, PF=1800, Calculate gross Salary monthly and Yearly, Calculate net salary monthly and Yearly, Calculate income tax on employee salary yearly
  8. This Python program takes input from the user in the form of space-separated integers and creates a tuple from those values. It then finds the smallest and largest elements in the tuple and prints them. (Use manual code, not built-in functions) 
  9. Write Python code to to create user defined function sum_of_digit to perform sum of digits of user input (e.g. if user input is 5678= 26)
  10.  Write Python program to create parameterized constructor to take the name of emp, emp id and employee basic salary. Take salary at run time and calculate salary for 12 months
  11. Write Python program to take user string “Hello friends how are you, All the best for your practical examination” Use regular expression and find all words starting from ‘H’ letter, display the position of that word. Find ‘Hello” word and replace it with ‘Namaste”
  12.  Write Python code to check given number is odd or even using user defined function
  13. Write a program in php to establish a database connection with mysql and perform Create table , insert operation.
  14.  This Python program takes input from the user for key value pair for your dictionary. It then find the smallest and largest elements in the dictionary and prints them. (Use manual code, not built-in functions)
  15. Write recursion function to calculate factorial of given number.
  16.  Write Python code read a file content from Myfile.text. Display contents of file
  17. Write Python code to perform addition of two integers using Lambda function
  18. Write Python code to create user defined package named Mypackage. Create module named Factorial to calculate factorial of user input. Import module to display the factorial of given number
  19. Write Python code perform following operations on list, insert new elements in list, display index of fourth element in your list, sort list elements in ascending and descending order, remove list element from list
  20. Write Python code to create list of 5 subjects to store first element is name of subject, second element is internal marks out of 30, third element is End term marks out of 70. Create DataFrame named Result_Analysis. Give labels to DataFrame as Subject, Internal Marks, End_Term Marks. Apply basic operations on DataFrame
  21. Write Python program to create Base class Employee, Derived classes HR Dept. and IT Dept. Take name Empid, and salary. Display the details of employee of both the departments.
  22. Write Python code to validate email Id using regular expressions
  23.  Write Python code to open a file name Python.txt. Add at least four lines in file and display all the contents on screen.
  24. Write Python code to demonstrate Built-in packages in Python
  25. Write Python code to find the given number is palindrome or not 
  26. Write Python code to overload arithmetic operators (any three).
  27. Write Python code to perform basic set operations. 
  28. Write Python code to create file named file.txt. Change the name of file..txt with file1.txt. Remove file1.txt
  29. Write Python program to create user defined function to print number in reverse order
  30.  Write a Python program to demonstrate multilevel inheritance. The base class name is GrandParent Create two classes which will be derived from related class which demonstrate multilevel inheritance
  31. Write program to create file. Enter some contents in your file. Use readline(), readlines() function

B. Python Program List with Source Code

  1. Python program to perform addition of two numbers and display average
  2. Python program to perform all arithmetic operations
  3. Python program to perform all arithmetic operations by taking user input
  4. Python program to calculate area of geometric shapes
  5. Arithmetic operations and use of format()
  6. Python program to find simple interest
  7.  Python program to convert temperature from degree Celsius to degree Fahrenheit
  8. Python program to find percentage of student in examination
  9. Time conversion program in Python
  10. Perform various operations on string
  11. Perform various operations on List
  12. Python program to find number is greater or smaller
  13. Python program to check given number is odd or even
  14. Python program to check person is eligible for voting or not
  15. Python program to check the student is pass or fail in examination
  16. Python program to check year is leap or not
  17. Python program to check student grade in examination using if-elif statement
  18. Python program to find greater, smaller or equal of three numbers using logical operator 
  19. Python program to find student grade in examination by using if-elif-else statement
  20. Python Program to find student Grade in Examination by suing if-elif-else and use of logical and operator 
  21. Python Program to Perform Arithmetic Operation Based on User Choice 
  22. Python Program to Perform Area of  Geometric Shapes. The Result will be displayed on Screen Based on User Choice
  23. Python Program to Print Number is positive or Negative. Then Check Number is Odd or Even Using Nested if Statement
  24. Demonstration on for Loop in Python
  25. Python Program to find sum of List Items Using For Loop
  26. Python Program To Take List Items at Run Time and Then Perform Sum of Even List Items
  27. Demonstration on For Loop Using Range Keyword
  28. Python Program to Display Table of 5 Using for Loop and Range function 
  29. Python Program to print Sum of First 10 Natural Numbers
  30. Python Program to Print First n Natural Numbers Using while Loop
  31. Python Program to Print Sum of N Numbers Using while Loop
  32. Sum of n even natural numbers using while loop
  33. Python Program to Calculate Factorial of Given Number Using While Loop 
  34. Python Program to Print Fibonacci Series using While Loop
  35. Python Program to Print Given Number in Reverse Order
  36. Python Program to check Given Number is Palindrome or Not 
  37. Python Program to Print Sum of all Elements in Tuple 
  38. Python Program to Print Sum of all Even Elements From Tuple 
  39. Python Program to Find Smallest and Largest Element From Tuple
  40. Python Program to Print All Even Data Element from Set
  41.  Python Program To Print Sum of Even Data Elements
  42. Python Program to print sum of all values in Dictionary
  43. Python Program to Create Dictionary to print student result in Grade
  44. Python Program to Create Dictionary and Print Student Performance in Examination( Take User Input)
  45. Python Code to Create Dictionary To Check Cricket Record in Test Series 
  46. Python Program to Check Number is Odd or Even Using Function
  47. Python Program to Print Number in Reverse Order
  48. Creating New File info.txt on Disk and Write New Contents to the File In Python
  49. Write Python Program to Create File and read the contents without read() Method
  50. Write Python Code to Create file to Write The contents to file at the Run Time
  51. Student result analysis using class where all methods are defined inside the class defined
  52. demonstration of Constructors in Python
  53. Working with DataFrame- Working with Built-in packages




टिप्पणी पोस्ट करा

0 टिप्पण्या