cs
cs
SCIENCE
ASSIGNMENT
By Jerom Mathew Reji
>>>
1.
2. Write a program that calculates marks sum (5
subjects) and displays percentage & its
corresponding grade.
>>>
2.
3.Write a program to display whether the entered
number is positive,negative or zero.
>>>
3.
4.Write a menu driven program to calculate area of
a circle,rectangle or triangle.
>>>
4.
5.Write a program to calculate the factorial of a
given number.
>>>
5.
6.Write a program to display the sum of ‘n’ natural
terms.
>>>
6.
7.Write a program to display the sum of all positive
numbers.If a negative number is entered,terminate
the program.
>>>
7.
8.Write a program to generate the following
pattern using nested loops.
>>>
8.
9.Write a program to find the sum of digits of a
number,input by the user
>>>
9.
10.Write a program to produce the given sequence.
1,-4,7,-10,.......until n terms
>>>
10.
11.Write a program to determine whether a
number is a palindrome.
>>>
11.
12.Write a program to display n terms of the
Fibonacci sequence.
0 1 1 2 3 5 8…..n
>>>
12.
13.Write a program to read a list of n integers and
find their median.
>>>
13.
14.Write a program to count the number of times a
character occurs in a string.
>>>
14.
15.Write a program to replace all vowels in a string
with ‘*’
>>>
15.
16.Write a program to count and display the
number of vowels,consonants,uppercase,lowercase
characters in string, entered from the user.
>>>
16.
17.Write a program to input a string and convert
the case of characters in it.
>>>
17.
18.Write a program to find the largest/smallest
number in a list/tuple.
>>>
18.
19.Write a program to input a list of numbers and
swap elements at the even location with the
elements at the odd location.
>>>
19.
20.Write a program to input a list/tuple of
elements,search for a given element in the
list/tuple.
>>>
20.
21.Write a program to read a list of n integers
(positive as well as negative). Create two new lists,
one having all positive and the other having all
negative numbers from the given list.Print all three
lists.
>>>
21.
22.Write a program that asks for the:
i) position
ii)value of the element to be deleted from list and
deletes it
>>>
22.
23.Write a program to enter names of employees
and their salaries as input and store them in a
dictionary.
>>>
23.
24.Write a program to 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.
>>>
24.