0% found this document useful (0 votes)
9 views29 pages

class11 _practical

computer science

Uploaded by

shaunanto2008
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)
9 views29 pages

class11 _practical

computer science

Uploaded by

shaunanto2008
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/ 29

INSTRUCTIONS:

1) TITLE, AIM,SOURCE CODE and RESULT must


be in capital le er and in black pen.
2) SAMPLE OUTPUT must be wri en in le
hand side(unruled ).Should be wri en in
PEN only.
3) Program and content of aim and result
should be wri en in blue pen.
4) RESULT must be wri en in new page above
the Teacher’s signature only.
5) Pages should be numbered in odd series.
6) Sample Output must be wri en parallel to
the Title page.
NOTE:
WRITE NEATLY AND CLEARLY.
FAILING TO FOLLOW THE ABOVE
INSTRUCTIONS WILL BE MADE TO REDO
THE RECORD WORK.
1. SIMPLE INTEREST CALCULATOR-SEQUENTIAL STATEMENTS
AIM:
To write a simple python program to calculate simple interest for the user entered input.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


2. ODD OR EVEN - IF.. ELSE STATEMENTS

AIM:
To write a python program to check whether the user entered number id Odd or Even.

SOURCE CODE:

SAMPLE OUTPUT:
RUN-1

RUN-2

RESULT:

Thus, the above program is executed and verified successfully.


3. GREATEST OF THREE NUMBERS (ELIF STATEMENT)

AIM:

To write a program to find the greatest of the three numbers using elif statement.

SOURCE CODE:

SAMPLE OUTPUT:

RUN-1

RUN-2
RESULT:
Thus, the above program is executed and verified successfully.
4. FACTORIAL OF THE GIVEN NUMBER-(FOR LOOP)

AIM:
To write a program to find the factorial of the given number using for loop.

SOURCE CODE:

SAMPLE OUTPUT:

RUN-1:

RUN-2:

RESULT:
Thus, the above program is executed and verified successfully.
5. SIMPLE CALCULATOR (WHILE LOOP)

AIM:

To write a program to create a simple calculator using a while loop.

SOURCE CODE:

SAMPLE OUTPUT:
RESULT:

Thus, the above program is executed and verified successfully.


6. DISPLAYING RIGHT ANGLED TRIANGLE (NESTED LOOPS)
AIM:
To write a python program to display right angled triangle pa ern using nested
loop.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


7. COUNTING NUMBER OF VOWELS IN A STRING
AIM:
To write a python program to count the number of vowels, consonants and
space present in a string.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


8. COUNTING UPPERCASE, LOWERCASE, DIGITS AND WORDS IN A STRING

AIM:
To write a python program to find the frequency of uppercase,lowercase
,digits ans words in a string.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:
Thus, the above program is executed and verified successfully.
9. DISPLAYING THE LIST OF PRIME NUMBERS
AIM:

To write a python program to generate prime numbers between the range.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


10. DISPLAYING LIST OF PALINDROME STRINGS (LISTS AND
STRINGS)
AIM:
To write a python program to display list of palindrome string . SOURCE
CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


11. LIST TRAVERSAL USING FOR LOOP IN PYTHON.
AIM:
To write a program to display list traversal using for loop in python.
SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


12. DISPLAYING RECORDS OF STUDENTS (LIST OF TUPLES)
AIM:
To write a python program to get student details and print them in list of
tuples.

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


13. SEARCHING AND DISPLAYING THE PIN CODE OF THE GIVEN CITY (DICTIONARIES)

AIM:
To write a program to search and display the pin code of the given city using
dic onaries.

SOURCE CODE:

SAMPLE OUTPUT:
RUN-1

RUN-2:

RESULT: Thus, the above program is executed and verified successfully.


14. Menu driven program to perform various string opera ons.

AIM:

To write a python menu driven program to perform various string opera ons .

SOURCE CODE:
SAMPLE OUTPUT:

CHOICE 2

CHOICE 3

CHOICE 4

CHOICE 5
RESULT:
Thus, the above program is executed and verified successfully.
15. Perfect number/Armstrong/Palindrome
AIM:
To write a Python program to determine whether a number is a perfect
number, an Armstrong number or a palindrome.

SOURCE CODE:
SAMPLE OUTPUT:

RUN-1

RUN-2

RUN-3

RESULT:
Thus, the above program is executed and verified successfully.
16. MENU DRIVEN PROGRAM TO PERFORM VARIOUS LIST OPERATIONS.
AIM:

To write a python menu driven program to perform various list opera ons.

SOURCE CODE:
SAMPLE OUTPUT:

CHOICE 2:

CHOICE 3:

CHOICE 4:

CHOICE 5:

RESULT:

Thus, the above program is executed and verified successfully.


17. PROGRAM TO CREATE A FUNCTION TO ADD TWO NUMBERS.

AIM:
To write a python program to create a func on to add two numbers.
SOURCE CODE:

SAMPLE OUTPUT:

RESULT:
Thus, the above program is executed and verified successfully.
18. SUM OF SERIES

AIM:
To write a program to input the value of x and n and print the
sum of the following series.
1+x2+x3+x4…….…. xn

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


19. REMOVE AN ELEMENT IN A TUPLE
AIM:
To write a Python program to remove an item from a tuple..

SOURCE CODE:

SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.


20. MAXIMUM, MINIMUM AND MEAN IN A TUPLE
AIM:
To Write a program to input n numbers from the user. Store these numbers in a
tuple. Print the maximum, minimum, sum and mean of number from this tuple.

SOURCE CODE:
SAMPLE OUTPUT:

RESULT:

Thus, the above program is executed and verified successfully.

You might also like