Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 16

Computer Science Practical

File
NAMAN POSWAL
11-A
Submitted to: Poonam ma’am

1
Program Page No
Input a welcome message and display it 3

Input two number and display the large/smaller number 4

Input three numbers and display the large/smaller number 5

Write a program to input the value of x and n and print the sum of the following: 6
1+x+x^2+x^3+......x^n

I
1-x+x^2-x^3-x^4-......x^n
x+x^2/2 + x^3/3+x^4/4....x^n/n
x+x^2/2! + x^3/3! + x^4/4!+....x^n/n!
Determine whether a number is a perfect number, an Armstrong number or a palindrome

Input a number and check if the number is prime or composite no.


7

8
N
Display the terms of a Fibonacci series
Compute the greatest common divisor and least common multiple of two integers
9
10
D
Count and display the number of vowels, consonants, uppercase, lowercase characters in string 11 E
Input a string and determine whether it is a palindrome or not convert the case of characters in a string

Find the largest and smallest number in a list


12

13
X
Input a list of number and swap elements at the even location with the elements at the odd location 14

Input a list/tuple of elements, search for a given elements in the list/tuple 15

Create a dictionary with the roll number, name and marks of n students in class and display the names of students who 16
have marks above 75 2
Input a welcome message and display it

Input

Output

3
Input two number and display the large/smaller number

Input Output

4
Input three numbers and display the large/smaller number

Input Output

5
Input

Output

Write a program to input the value of x and n and print the sum of the following:

1+x+x^2+x^3+......x^n
1-x+x^2-x^3-x^4-......x^n
x+x^2/2 + x^3/3+x^4/4....x^n/n
x+x^2/2! + x^3/3! + x^4/4!+....x^n/n!

6
Determine whether a number is a perfect number, an Armstrong number or a palindrome

Input

Output

7
Input a number and check if the number is prime or composite no.
Input

Output

8
Display the terms of a Fibonacci series

Input

Output

9
Compute the greatest common divisor and least common
multiple of two integers

Input

Output

10
Count and display the number of vowels, consonants,
uppercase, lowercase characters in string

Input

Output

11
Input a string and determine whether it is a palindrome or not
convert the case of characters in a string

Input

Output

12
Find the largest and smallest number in a list

Input

Output

13
Input a list of number and swap elements at the even location
with the elements at the odd location

Input

Output

14
Input a list/tuple of elements, search for a given elements in the
list/tuple
Input

Output

15
Create a dictionary with the roll number, name and marks of n
students in class and display the names of students who have marks
above 75

Input Output

16

You might also like