0% found this document useful (0 votes)
11 views3 pages

Xi Final CS List PRG

The document contains a series of programming exercises designed to test various programming skills. It includes tasks such as generating multiplication tables, checking for positive or negative numbers, creating patterns, calculating areas, and working with strings and lists. Additionally, it covers concepts like Fibonacci series, temperature conversion, and dictionary manipulations.

Uploaded by

gokubleachnigoi
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)
11 views3 pages

Xi Final CS List PRG

The document contains a series of programming exercises designed to test various programming skills. It includes tasks such as generating multiplication tables, checking for positive or negative numbers, creating patterns, calculating areas, and working with strings and lists. Additionally, it covers concepts like Fibonacci series, temperature conversion, and dictionary manipulations.

Uploaded by

gokubleachnigoi
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/ 3

Question No.

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.

3. Write program to print the following pattern:


1 2 3 4 5
1 2 3 4
1 2 3
1 2
1

4. Write a program to find whether a person is a senior citizen or not.

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.

8. Write program to generate the Fibonacci Series as 1, 1, 2, 3, 5, 8, … terms.


Where N is the number of terms given by the user.

9. Write a program to obtain temperature in Celsius and convert it into Fahrenheit


using formula:
9
℃ × + 32 = ℉
5

10. Write program to calculate commission for the salesmen. The commission is
calculated according to following rates:

Sales Commission Rate


50001 onwards 15%
42001-50000 10%
32001-42000 7%
22001-32000 3%
0-22000 0%

By using simple if.

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! − ⋯ 𝑥 ⁄𝑛!

14. Write a program to check whether an input number is a Palindrome number or


not.

15. Write a program to check input number is an Armstrong number or not.


Note:
if a 3 digit number is equal to the sum the cubes of its each digit, then it is an
Armstrong number.
Example: 153 = 13 +53 + 33

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’.

3. Write a program to input a string and check if it is a palindrome string or not.

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.

9. Program to calculate the mean of a given list of numbers

10. Program to search for an element in a given list of numbers.

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.

15. Write a menu driven program to do the following functionalities:


1. To display multiplication table of given/input number.
2. To display prime numbers up to given input number
3. Exit.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy