Practical List
Practical List
C. 1 1 1 1 1 D. 0
2222 0 1
333 0 2 4
44 0 3 6 9
5 0 4 8 12 16
0 5 10 15 20 25
0 6 12 18 24 30 36
Page 1 of 3
E. A F. * * * * * *
BB *****
CCC ****
DDDD ***
EEEEE **
*
G. * H. A
** BC
*** DEF
**** GHIJ
***** KLMNO
****
***
**
*
Ques 16. Program to add the odd numbers up to (and including) a given value N and print the result.
Ques 17. Given two integers x and n, compute 𝑥n.
Ques 18. Write a program to input the value of x and n and print the sum of the following series:
A. 1+x+x2+x3+x4+………..xn
B. 1-x+x2-x3+x4-………..xn
C. x+x2/2-x3/3+x4/4-………..xn/n
D. x+x2/2!-x3/3!+x4/4!-………..xn/n!
Ques 19. Determine whether a number is a perfect number or a Palindrome number.
Ques 20. Determine whether a 3-digit number is an Armstrong number or not.
Ques 21. Determine whether a n-digit number is an Armstrong number or not.
Ques 22. Input a number and check if the number is a prime or composite number.
Ques 23. Display the terms of a Fibonacci series.
Ques 24. Compute the greatest common divisor and least common multiple of two integers.
Ques 25. Count and display the number of vowels, consonants, uppercase, lowercase characters in string.
Ques 26. Input a string and determine whether it is a palindrome or not; convert the case of characters in
a string.
Page 2 of 3
Ques 27. Write a program to convert a string with more than one word into titlecase string where string
is entered by the user.
Ques 28. Write a program that takes a sentence as an input where each word in the sentence is separated
by a space. The program should replace each blank with a hyphen and then print the modified sentence.
Ques 29. Find the largest number in a list and a tuple.
Ques 30. Input a list of numbers and split the elements at the even location and the elements at the odd
location into two different lists.
Ques 31. Write a program for Linear search.
Ques 32. Input a list/tuple of elements, search for a given element in the list/tuple.
Ques 33. Input a list of numbers and test if a number is equal to the sum of the cubes of its digits. Find
the smallest and largest such number from the given list of numbers.
Ques 34. Write a program to count frequency of an element of a list using a dictionary.
Ques 35. Write a program to count the number of times a character appears in a given string using a
dictionary.
Ques 36. 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.
Page 3 of 3