Professional Documents
Culture Documents
Computer Practical File
Computer Practical File
Computer Science
Python
************Output of program************
Program 2: WAP for calculating simple interest
***************Code***************
**********Output of program**********
Program 3: WAP to accept a number from the user and
display whether it is an even number or odd number
***************Code***************
**********Output of program**********
Program 4: WAP to accept percentage of a student and display
its grade accordingly.
***************Code***************
**********Output of program**********
Program 5: WAP to print Fibonacci series up to certain limit.
***************Code***************
**********Output of program**********
Program 6: WAP to display prime numbers up to a certain limit.
***************Code***************
**********Output of program**********
Program 7: WAP to accept a number, find and display whether
it’s an Armstrong number or not.
***************Code***************
**********Output of program**********
Program 8: WAP to accept a number and find out whether it is
a perfect number or not.
***************Code***************
**********Output of program**********
Program 9: WAP to print the sum of the series
1+x1/1! +x2/2!.....xn/(n)!- exponential series
***************Code***************
**********Output of program**********
Program 10: WAP to print the following patterns
1
12
123
***************Code***************
**********Output of program**********
Program 11: WAP to accept a string and display whether it is a
palindrome or not.
***************Code***************
**********Output of program**********
Program 12: WAP that counts the number of alphabets and
digits, uppercase letters and lowercase letters, spaces and other
characters in the string.
***************Code***************
**********Output of program**********
Program 13: WAP that accepts a string (a sentence) and returns
the string having first letters of each word in capital letters
***************Code***************
**********Output of program**********
Program 14: WAP to remove all the odd numbers from a given
list.
***************Code***************
**********Output of program**********
Program 15: WAP to input a list of numbers and test if a
number is equal to the sum of the cubes of its digits. Find the
smallest and largest such numbers from the given list of
numbers.
***************Code***************
**********Output of program**********
Program 16: WAP to find the second largest number of a list of
numbers.
***************Code***************
**********Output of program**********
Program 17: WAP to check if the minimum elements of a tuple
lies at the middle position of the tuple.
***************Code***************
**********Output of program**********
Program 18: WAP a program to input your friends’ name and
their phone numbers and store them in the dictionary as the
key-value pair. Perform the following operations on the
dictionary:
a. Display the name and phone number of all your friends.
b. Add a new key-value pair in this dictionary and display the
modified dictionary.
c. Delete a particular friend from the dictionary.
d. Modify the phone number of an existing friend.
e. Check if a friend is present in the dictionary or not.
f. Display the dictionary in sorted order of the names.
***************Code***************
**********Output of program**********