Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

CLASS-XI COMPUTER SCIENCE

LIST OF PRACTICAL QUESTIONS


Ques 1. Input a welcome message and display it.
Ques 2. Write a program to accepts two integers and print their sum.
Ques 3. Input two numbers and display the larger / smaller number.
Ques 4. Input three numbers and display the largest number.
Ques 5. Write a program that accepts radius of a circle and prints its area.
Ques 6. Write a program that inputs a student’s marks in three subjects (out of 100) and prints the
percentage marks.
Ques 7. Write a program to compute area of square and triangle.
Ques 8. Write a program to compute simple interest.
Ques 9. Write a program to read two numbers and prints their quotient and reminder.
Ques 10. Write a program to find whether a given number is even or odd.
Ques11. Write a program to print roots of a quadratic equation ax2 + bx +c=0 (where a≠0).
Ques 12. Program to print first n Natural numbers and their sum.
Ques 13. Program to calculate factorial of an integer using for loop and while loop.
Ques 14. Write a program to print table of a given number.
Ques 15. Write a program to print following patter on screen
A. * B. 1
** 22
*** 333
**** 4444
55555

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

You might also like