Xi Final CS List PRG
Xi Final CS List PRG
01
1. Write a program to accept a number from the user and print the table of that
number.
2. Write a program to accept a number from the user and test whether it is negative,
positive or zero. Display appropriate message in each case.
5. Write a program to calculate area and circumference of a circle and display the
results.
6. Write a program accept an alphabet from the user and display whether it is a
vowel or a consonant.
7. Write a program to find the largest number among the three given numbers.
10. Write program to calculate commission for the salesmen. The commission is
calculated according to following rates:
11. Write program to generate the sequence: -5, 10, -15, 20, -25, ......
up to n, where N is an integer input by the user.
1
12. Write a program to find the sum of:
1 + 1 + 1/8 + 1/27 + . . . . . . . + 1/𝑛3, where 𝑛 is the number input by the
user.
13. Write Program to input the value of x and n and calculate and print the sum of
the series:
2 3 4 𝑛
𝑥 + 𝑥 ⁄2! − 𝑥 ⁄3! + 𝑥 ⁄4! − ⋯ 𝑥 ⁄𝑛!
Question No. 02
1. Write a program accept an alphabet from the user and display whether it is a
vowel or a consonant.
2. Write a program to input two strings. If strings1 is contained in string2, then create
a third string with first four characters of string2, added with word ‘Restore’.
4. Write a program that reads a string and then prints a string that capitalizes every
other letter in the string e.g., passion becomes pAsSiOn.
5. Write a program that inputs a line of text and prints its each word in a separate
line. Also, prints the count of words in the line.
6. Write a program that asks the user to input a number / a list to be appended to
an existing list. Whether the user enters a single number or a list of numbers, the
program should append the list accordingly.
7. Program to find the minimum element from a list of elements along with its index
in the list.
8. Program that displays options for inserting or deleting elements in a list. If the
user chooses a deletion option, display a submenu, and ask if element is to be
deleted with value or by using its position or a list slice is to be deleted.
2
11. The list Divisibility contains the following elements:
9, 35, 4, 19, 55, 12, 55, 36
Write the program to swap the content with next value divisible by 5 so that the
resultant list will look like
9, 4, 35, 19, 12, 55, 36, 55
12. Write a program to create a dictionary namely Numerals from following two
lists.
Keys = [‘One’, ‘Two’ , ’Three’]
Values= [1, 2, 3]
13. Your school has declared to deposit scholarship amount of Rs. 2500/- to
some selected students.
Write a program to input the selected students’ roll number and create a
dictionary for the same.
14. Write a menu driven program to create a dictionary Stud which stores marks of
students of a class with roll numbers as the keys and marks as the values.
Perform the following functionalities on the created dictionary Stud:
1. Add new element to the dictionary Stud
2. Delete element from the dictionary Stud
3. Display dictionary elements
4. Exit.