Class X Record Book Questions
Class X Record Book Questions
DATE : 18-10-2024
1. Write a menu driven program to generate the uppercase letters from Z to A and lowercase
letters from ‘a’ to ‘z’ as per the user’s choice. Enter 1 to display uppercase letters from Z to A
and Enter ‘2’ to display lowercase letters from ‘a’ to ‘z’.
3. To input a number and to calculate & display the factorial of each Digit.
Sample Input : 365
Output :
Factorial of 5 : 120
Factorial of 6 : 720
Factorial of 3 : 6
5. Write a menu driven program to display the pattern of a string entered by the user. If the user
enters a choice ‘F’ then it displays the first character of each word. In case the choice is ‘L’, then
it will display the last character of each word.
Sample Input : GOD IS REALLY GREAT
Enter your choice : L
Enter your choice : F
SAMPLE Output: G Sample Output: D
I
S
R
G Y
6. Write a program to generate a triangle or an inverted triangle based upon User’s choice.
If choice is 1, then display the following triangle -
B
L L
UUU
E E E E
J J J J J
If choice is 2, then display the following triangle
BLUEJ
BLUE
BLU
BL
B
7. Special words are those words which start and end with the same letter.
Example : EXISTENCE, COMIC, WINDOW
Palindrome words are those words which read the same from left to right and vice-versa.
Example: MALAYALAM, MADAM, LEVEL
All palindromes are special words but all special words are not palindromes.
WAP to accept a word. Check and display whether the word is a palindrome or only a special
word or none of them.
8. Write a program to input a sentence. Create a new sentence by replacing each consonant with
the previous letter. If the previous letter is a vowel, then replace it with the next letter ( i.e, if the
letter is B, then replace it with C as the previous letter of B is A). Other characters must remain
same. Display the new sentence.
Sample Input: THE CAPITAL OF INDIA IS NEW DELHI
Sample Input: MADAM, TEACHER, REFER, SUNLIGHT, NOON, DAD, PLANT, MOM, MAGIC, CHALK.
double area(int a, int b, int height) with three integer arguments, returns the area of a
trapezium using the formula :
1
area = 2 ∗ ℎ𝑒𝑖𝑔ℎ𝑡 ∗ (𝑎 + 𝑏)
double area(double diagonal1, double diagonal2) with two double arguments, returns the area
of a rhombus using the formula :
1
area = = 2 ∗ 𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙1 ∗ 𝑑𝑖𝑎𝑔𝑜𝑛𝑎𝑙2
void display() : To display all details of a customer such as name, coach, total amount and
mobile number.
Write a main method to create an object of the class and call the above member methods.
More than Rs. 1000 and less than or equal to Rs. 3000 10% of price
void display() : To display the name and price of the book after discount.
Note :
✓ Questions 1 to 13 are already completed by 31st July 2024.
✓ Questions 14 to 20 to be completed by 18 th November 2024.
✓ Please check each page of your record book and do the corrections as mentioned by the
teacher (for the first 13 programs). SUBMIT THE RECORD BOOK WITH THE CORRECTIONS
on 18thNovember 2024.
✓ The variable names, data types and description of the variables to be written in table
format. [ Tables to be drawn in pencil only ]
✓ Write the input given and the output obtained (under heading OUPUT) when you executed
the program which depicts your program is working.
✓ Write the program neatly in your computer record book and make sure your work is neat
and without any errors.
✓ LATE SUBMISSION OF RECORD IS NOT ENTERTAINED.