CLASS 11

COMPUTER SCIENCE PRACTICALS

  1. Write a program in Python to Input a welcome message and display it.
  2. Write a program in Python to Input two numbers and display the larger number.
  3. Write a program in Python to Input two numbers and display the smaller number.
  4. Write a program in Python to Input three numbers and display the largest number.
  5. Write a program in Python to Input three numbers and display the smallest number.
  6. Write a program in Python to generate the following pattern using nested loops:         

    12345

    12345

    12345

    12345

    12345

  7. Write a program in Python to generate the following pattern using nested loops:          

    11111

    22222

    33333

    44444

    55555

  8. Write a program in Python to generate the following pattern using nested loops:          

    1

    12

    123

    1234

    12345

  9. Write a program in Python to generate the following pattern using nested loops:          

    1

    22

    333

    4444

    55555

  10. Write a program in Python to generate the following pattern using nested loops:        

    12345

    1234

    123

    12

    1

  11. Write a program in Python to generate the following pattern using nested loops:       

    55555

    4444

    333

    22

  12. Write a program in Python to generate the following pattern using nested loops:        

    54321

    5432

    543

    54

    5

  13. Write a program in Python to generate the following pattern using nested loops:        

    5

    54

    543

    5432

    54321

  14. Write a program in Python to generate the following pattern using nested loops:        

    A

    AB

    ABC

    ABCD

    ABCDE

  15. Write a program in Python to generate the following pattern using nested loops:        

    *

    **

    ***

    ****

    *****

  16. Write a program in Python to generate the following pattern using nested loops:        

            1

          123

        12345

      1234567

    123456789

  17. Write a program in Python to generate the following pattern using nested loops:        

    ABCDEFEDCBA

    ABCDE EDCBA

    ABCD      DCBA

    ABC            CBA

    AB                 BA

    A                      A

  18. Write a program in Python to generate the following pattern using nested loops:        

               1

             234

          56789

    10111213141516

  19. Write a program in Python to display the first 'n' terms of a Fibonacci series.
  20. Write a program in Python to input a number and determine the sum of the digits of that number.
  21. Write a program in Python to input a number and determine the multiplication of the digits of that number.
  22. Write a program in Python to input a number and determine whether the number is an Armstrong number or not.
  23. Write a program in Python to print all Armstrong numbers from 0 to 10000.
  24. Write a program in Python to input a number and determine whether the number is a perfect number or not.
  25. Write a program in Python to input a number and determine whether the number is a prime number or not.
  26. Write a program in Python to to generate all prime numbers between 2 to 100.
  27. Write a program in Python to input a number and determine whether the number is composite number or not.
  28. Write a program in Python to compute the greatest common divisor of two integers.
  29. Write a program in Python to computer the least common multiple of two integers.
  30. Write a program in Python to input a string and determine whether the string a palindrome or not.
  31. Write a program in Python to input a string, then Count and display the number of vowels, consonants, uppercase, lowercase characters in string. 
  32. Write a program in Python to input a string and convert the case of characters (uppercase to lowercase and lowercase to uppercase) in the string. 
  33. Write a program in Python to Input a list of numbers and find the largest number in a list.
  34. Write a program in Python to Input a list of numbers and find the smallest number in a list.
  35. Write a program in Python to Input a tuple of numbers and find the largest number in a tuple.
  36. Write a program in Python to Input a tuple of numbers and find the smallest number in a list.
  37. Write a program in Python to Input a list of numbers and swap elements at the even location with the elements at the odd location. 
  38. Write a program in Python to Input a list of numbers and find the index of a specific element.
  39. Write a program in Python to Input a tuple of numbers and find the index of a specific element.
  40. Write a program in Python to create a dictionary with the roll number, name and marks of n students in a class and display the names of students who have marks above 75.
  41. Write a program in Python to input a list of numbers and find the mean, mode and median.
  42. Write a program in Python to create a list of 10 random numbers between 1 to 100.
  43. Write a program to input the value of x and n and print the sum of the following series:  1 + x + x2 + x3 + x4 + ---------- + xn
  44. Write a program to input the value of x and n and print the sum of the following series: 1 - x + x2 - x3 + x4 + ----------  xn
  45. Write a program to input the value of x and n and print the sum of the following series: x + x2/2 + x3/3 + x4/4 + ---------- + xn/n
  46. Write a program to input the value of x and n and print the sum of the following series: x + x2/2! + x3/3! + x4/4! + ---------- + xn/n!
  47. WAP in Python to input a string and display the frequency of each character using dictionary
  48. WAP in Python to create a dictionary with name of employee, their salary and access them.
  49. WAP in the Python to create a list and find the mean of all numeric values stored in the list.
  50. Write a program in Python to count the frequency of all elements of a list.
  51. Write a program in Python to count the frequency of all elements of a tuple
  52. Write a program in Python to find the mean of numeric values stored in the given tuple.
  53. Write a program in Python that accepts radius of a circle and prints its area.
  54. Write a program in Python that accepts side of a square and find the area of the square.
  55. Write a program in Python which accepts two numbers and calculate their sum, difference, multiplication and division.
  56. Write a Python Program which accepts three numbers from user and displays their sum and average.
  57. Write a Python program to take temperature in Fahrenheit as input and convert it to Celsius.
  58. Write a Python program to take temperature in Celsius as input and convert it to Fahrenheit.
  59. Write a program in Python to input a number and check whether it is even or odd.
  60. Write a program in python to input two numbers and prints “SAME” if both the numbers are either even or both are odd otherwise prints “NOT SAME”.
  61. Write a program in python that takes age as input from the user and if age is greater than or equal 18 then print “YOU CAN VOTE” otherwise print “YOU CAN NOT VOTE”.
  62. Write a program in python that takes two numbers from the user and check whether 1st number is divisible by 2nd number or not. print “Divisible” if number is divisible otherwise print “Not Divisible”
  63. Write a program in python to input 4 numbers if the multiplication of the numbers is odd then calculate its square otherwise calculate its cube.
  64. Write a program in python to input 4 numbers if the addition of all the numbers is multiple of 5 then divide it by 5 otherwise multiply it with 10.
  65. Write a Python program to take sides of a triangle as input and print its area using Heron's Formula.
  66. Write a program in python to input number of seconds and print it in the form: hrs:mins:sec. e.g. 4815 seconds are printed as 1 hrs:20 mins:15 secs
  67. Write a program in Python to input a number and print the table of that number.
  68. Write a program in python to print the tables all all numbers from 2 to 10
  69. Write a program in python to input a number and calculate factorial of a number.
  70. Write a program in python to generate the sequence: -1, 2, -3, 4, -5, …n, where n is an integer and its value should be taken as n input from the user.
  71. Write a program in python to print all the numbers between 1 to 100 which are either divisible by 3 or 5.
  72. Write a Python program that accepts the roll number and marks of the student in two subjects and displays the grade of the student as per the following criteria                       Percentage>60 : Grade A,                                                                                                             Percentage<=60 and Percentage>=33: Grade B                                                                       Percentage<33: Reappear
  73. Write a Python program to print the sum of first n odd natural numbers where the value of n is taken as input from the user.
  74. Write a Python program to receive numbers from user through keyboard until user inputs 0 to end the input process, then the program calculates and displays the sum of given odd numbers and even numbers respectively.
  75. Write a program in Python that takes a list of integer from the user and displays the number of even elements
  76. Write a program in Python that takes a string as an input and displays it if its length is greater than 5.
  77. Write a program in Python that repeatedly asks the user to input Student's Name and Class and store it in a dictionary D, whose keys are Student's Name and values are Student's Class. Then display the dictionary.
  78. Write a program in Python that accepts students names in the form of a tuple as an input from the user and then displays only those students' names that start with letter 'S' or 's'.
  79. Write a Python program to input 10 numbers to store in the list and print the third largest number.
  80. Write a program in Python to create a list of words which start and end with the same letter from a given string S="window apple wow table taught pencil comic'. The output should be: ['window', 'wow', 'taught', 'comic']
  81. Write a Python program to create NewList which contains all the values of original list after removing duplicate values. Also display the NewList.
  82. Write a Python program to take a list and two numbers X and Y, as input from user and create a new list containing those numbers which are divisible by both X and Y.