0% found this document useful (0 votes)
14 views5 pages

X Project Questions 24

The document contains a list of 20 programming project questions for Class X students, focusing on various computer programming tasks. These tasks include string manipulation, mathematical computations, pattern printing, and number classification. Each question provides sample inputs and outputs to guide students in their coding exercises.

Uploaded by

pixelperfect257
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)
14 views5 pages

X Project Questions 24

The document contains a list of 20 programming project questions for Class X students, focusing on various computer programming tasks. These tasks include string manipulation, mathematical computations, pattern printing, and number classification. Each question provides sample inputs and outputs to guide students in their coding exercises.

Uploaded by

pixelperfect257
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
You are on page 1/ 5

Class X

Computer Project Questions


1 Write a program to input a string (word). Convert it into lowercase letters. Count
and print the frequency of each alphabet present in the string. The output should
be given as:
Sample Input: Apple
Sample Output:
==========================
Alphabet Frequency
==========================
a 1
p 2
l 1
e 1
2 Write a Java program to input a sentence from the user and display the words
which contain the alphabet 'A' in them in either Lowercase or Uppercase.
Sample Input : All is well that ends well.
Sample Output : All that

3 Write a program to compute the middle digit of a number entered. If the number
does not have a middle digit, it has to give the average of the two middle digits.

Example: if number: 1425 then average of middle two digits: 3


if number: 175 then middle digit: 7

4 Write a menu driven program to perform the following operations using switch-
case:
(a) Input an integer number and print the greatest and the smallest digits
present in the
number.
Example:
Input: n=2943
Output: Greatest digit = 9 and Smallest digit = 2
(b) Input two number and find HCF (Highest Common Factor) of numbers.
Example: if numbers: 15, 21 then HCF: 3

A
if numbers: 16, 24 then HCF: 8

5 Write a menu driven program to perform the following operations using switch-
case:
a) Write a program to find the sum of the following series:
√an-1 + √an-3 + √an-5 up to n terms

b) Write a program to compute the following series:


an-1 * an-2 +an-3 * an-4 up to n terms

6 Write a program to accept a word and Arrange all the alphabets of the word in its
alphabetical order and display the result.
Sample input: UNDERSTANDING
Sample output: ADDEGINNNRSTU

7 Write a menu driven program to perform the following operations using switch-
case:
(a) Print following pattern
1
13
133
1337
13375
(b) Write a program to enter a string and print the String in the following format:
Example: If given String s = "TIGER"
Output: R E G I T
REGI
REG
RE
R
8 Write a program to input a number and check given number is HAPPY. If sum of

B
squares of its digits is equal to 1. Repeat the process to sum of squares of digits
until either 1 or in any single digit.
For example 28 is HAPPY
(Working 22 +82 =68 , 62 +82 =100, 12 +02 +02 =1)
9 Write a program to enter a sentence. Replace the Lower Case Characters by # and
Upper
Case Characters by @
Input: Student Fail OR Pass
Output: @###### @### @@ @###

10 Write a program to count Prime palindrome numbers from 10 to 1000


For example 11, 101……they are Prime palindrome numbers

11 Write a program to find the roots of quadratic equation ax2+bx2+c=0 with the
following specifications:

Define a class QUAD with the following specifications:


Data Member / Instance variables:
float a,b,c : to store the co-efficient
float d : to store the discriminant
float r1,r2 : to store the roots of the equations
int days : to store the number of days returned late
double amt : to calculate and store the fine
Member Methods:
void input() : to input the co-efficient
void compute() : to find d=b2-4ac
void display() : if d<0 then print “Roots not possible” otherwise
find
and print r1=(-b+√d)/2a, r2=(-b-√d)/2a
Write a main method to create object of a class and call the above member
methods.

12 Write a program to input a sentence. Count the number of times a particular word
occurs
in it. Display the frequency of the search word.

Sample Input: Enter a sentence : To be or not to be.


Enter word to be searched : be

C
Sample Output: Frequency of the searched word : 2

13 Write a program to input a line of text from the user and create a new word formed
out
of the first letter of each word and convert the new word into Uppercase.
Example:
Input: Mangoes are delivered after Midday
Output: MADAM

14 Write a program to input a line of text from the user and convert into uppercase
letters. Display the words along with frequency of the words which have at least a
pair of consecutive letters.
Example:
Input: Modem is an electronic device
Output: MODEM
DEVICE
Number of words containing consecutive letters: 2

15 Write a program to input a string and convert into uppercase letters. Count and
display the number of words which has double letter sequences along with the
words.
Example:
Input: She was feeding the little rabbit with an apple
Output: FEEDING
LITTLE
RABBIT
APPLE

Number of words containing double letters sequences: 4

16 Write a program to input a string and convert into uppercase letters. Count and
display the palindrome words.
Example:
Input: Mom and Dad are not at home
Output: MOM

D
DAD

Number of palindrome words: 2

17 Write a program to input a string and convert into uppercase letters. Display the
word which has maximum number of vowels also display the number of vowels.
Example:
Input: Happy new year
Output: YEAR

Number of VOWELS: 2
18 Write a program to input a full name and display the abbreviations of the name
except the last word of the name.
Example:
Input: Mahendra Singh Dhoni
Output: M.S. Dhoni

19 Write a program to input a number and check given number is TECH. A number is
said to TECH If it has even number of digits, and when we split the number into
two halves then the square of sum of those halves is equal to number itself.
For example 2025 is TECH
(Working (20+25)2 =452 =2025)
20 Write a program to input a number and check given number is SUNNY. A number is
said to SUNNY If the square root of the next value of given number is a perfect
number.
For example 80 is SUNNY
(Working , Next value of is 80 =80+1=81, Square root of 81 =9, 81 is perfect square
of 9 , Hence 80 is SUNNY number )

You might also like