0% found this document useful (0 votes)
38 views

Computer Project

The document outlines 20 programs in Chapter 5 on getting started with Python, 19 programs in Chapter 6 on flow of control, 13 programs in Chapter 8 on strings, 20 programs in Chapter 9 on lists, and 12 programs in Chapter 10 on tuples and dictionaries. The programs cover basic concepts in Python like arithmetic operations, conditionals, loops, strings, lists, tuples, and dictionaries.

Uploaded by

Tejas Ebey
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views

Computer Project

The document outlines 20 programs in Chapter 5 on getting started with Python, 19 programs in Chapter 6 on flow of control, 13 programs in Chapter 8 on strings, 20 programs in Chapter 9 on lists, and 12 programs in Chapter 10 on tuples and dictionaries. The programs cover basic concepts in Python like arithmetic operations, conditionals, loops, strings, lists, tuples, and dictionaries.

Uploaded by

Tejas Ebey
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 75

Chapter 5: Getting Started With Python

Program 1: WAP to calculate the amount payable if money has been lent on simple interest.

Program 2: WAP to calculate in how many days a work will be completed by three persons A, B and
C together.
Chapter 5: Getting Started With Python

Program 3: WAP to enter two integers and perform all arithmetic operations on them.
Chapter 5: Getting Started With Python

Program 4: WAP that asks the user to enter their name and age. Print a message addressed to the user
that tells the user the year in which they will turn 100 years old.
Chapter 5: Getting Started With Python

Program 5: WAP that accepts the mass of an object and determines its energy.
Chapter 5: Getting Started With Python

Program 6: WAP to calculate the height reached by the ladder on the wall for the following values of
length and angle.
Chapter 5: Getting Started With Python
Chapter 6: Flow Of Control
Program 1: WAP to create a simple calculator performing only four basic operations.
Chapter 6: Flow Of Control
Program 2: WAP to find the factors of a whole number
Chapter 6: Flow Of Control
Program 3: WAP to print all prime numbers till n, specified by user
Chapter 6: Flow Of Control
Program 4: WAP to find the factorial of a number
Chapter 6: Flow Of Control
Program 5: WAP to print the table of a given number.
Chapter 6: Flow Of Control
Program 6: WAP to that prints the minimum and maximum of five numbers entered by the use.
Chapter 6: Flow Of Control
Program 7: WAP to check if the year entered by the user is a leap year or not.
Chapter 6: Flow Of Control
Program 8: WAP to generate the sequence: –5, 10,–15, 20, –25..... upto n, where n is an integer input
by the user.
Chapter 6: Flow Of Control
Program 9: WAP to find the sum of 1+ 1/8 + 1/27 ...... 1/n3 , where n is the number input by the user.
Chapter 6: Flow Of Control
Program 10: WAP to find the sum of digits of an integer number, input by the user.
Chapter 6: Flow Of Control
Program 11: WAP to check whether an input number is a palindrome or not.
Chapter 6: Flow Of Control
Program 12: WAP to print the following pattern:
Chapter 6: Flow Of Control
Program 13: WAP to print the following pattern:
Chapter 6: Flow Of Control
Program 14: WAP to print the following pattern:
Chapter 6: Flow Of Control
Program 15: WAP to print the following pattern:
Chapter 6: Flow Of Control
Program 16: WAP to print the Fibonacci’s sequence.
Chapter 6: Flow Of Control
Program 17: WAP to find the grade of a student.
Chapter 6: Flow Of Control
Program 18: WAP to find the sum of the cube of the numbers upto ‘n’, entered by the user.
Chapter 6: Flow Of Control
Program 19: WAP to check whether the number inputted is a prime no. or not.
Chapter 8: Strings
Program 1: WAP to input a string from the user and print it in the reverse order.
Chapter 8: Strings
Program 2: WAP which replaces all vowels in the string with '*'.
Chapter 8: Strings
Program 3: WAP to check if the entered string is a palindrome or not.
Chapter 8: Strings
Program 4: WAP to delete the occurrences of a given character in a string both inputted by the user.
Chapter 8: Strings
Program 5: WAP to input a string. Count no. of words, character, alphabets, digits and special
symbols.
Chapter 8: Strings
Program 6: WAP that replaces each space in the string inputted by the user with a hyphen.
Chapter 8: Strings
Program 7: WAP to find the sum of all the digits in a string.
Chapter 8: Strings
Program 8: WAP to convert the first letters of each word into capital in a string. (Must have more than
one word)
Chapter 8: Strings

Program 9: WAP to remove the duplicate characters from a given string.


Chapter 8: Strings
Program 10: WAP to replace string with substring.
Chapter 8: Strings
Program 11: WAP to check the number of special characters in a string.
Chapter 8: Strings
Program 12: WAP to find the number of vowels in a string.
Chapter 8: Strings
Program 13: WAP to print even length words in a string.
Chapter 9: Lists
Program 1: WAP to increment the elements of a list passed as an argument.
Chapter 9: Lists
Program 2: WAP to increment the elements of the list passed as parameter.
Chapter 9: Lists
Program 3: WAP to perform various list operations.
Chapter 9: Lists
Chapter 9: Lists
Chapter 9: Lists
Program 4: WAP to calculate average marks of n students using a function.
Chapter 9: Lists
Program 5: WAP to check if a number is present in the list or not. If the number is present, return the
position of the number.
Chapter 9: Lists
Program 6: WAP to find the number of times an element occurs in the list.
Chapter 9: Lists
Program 7: WAP to read a list of n integers (positive as well as negative). Create two new lists, one
having all positive numbers and the other having all negative numbers from the given list. Print all
three lists.
Chapter 9: Lists
Program 8: WAP to return the largest element of the list passed as parameter.
Chapter 9: Lists
Program 9: WAP to return the second largest number from a list of numbers.
Chapter 9: Lists
Program 10: WAP to read a list of n integers and find their median.
Chapter 9: Lists
Program 11: WAP to read a list of elements. Modify this list so that it does not contain any duplicate
elements.
Chapter 9: Lists
Program 12: WAP to read a list of elements. Input an element from the user that must be inserted in
the list. Also input the position at which it is to be inserted.
Chapter 9: Lists
Program 13: WAP to delete the element at the desired position in the list.
Chapter 9: Lists
Program 14: WAP to reverse a list in-place without creating a new list.
 
Chapter 9: Lists
Program 15: WAP to find the sum of all the elements in the list.
 
 
Chapter 9: Lists
Program 16: WAP to multiply all the elements in a list.
 
 

 
Chapter 9: Lists
Program 17: WAP to swap two elements in a list.
Program 18: WAP to print all odd numbers in a list.
Program 19: WAP to print even numbers in a list.
Program 20: WAP to check if an element exists in a list.
Chapter 10: Tuples And Dictionaries
Program 1: WAP to enter names of employees and their salaries as input
and store them in a dictionary.
Chapter 10: Tuples And Dictionaries
Program 2: WAP to convert a number entered by the user into its corresponding number in words.
Chapter 10: Tuples And Dictionaries
Program 3: WAP to read email IDs of n number of students and store them in a tuple.
Chapter 10: Tuples And Dictionaries
Program 4: WAP to receive names from the user and find if this student is present in the tuple or not.
Chapter 10: Tuples And Dictionaries
Program 5: WAP to find the highest 2 values in a dictionary.
Chapter 10: Tuples And Dictionaries
Program 6: WAP to create a dictionary from a string.
Chapter 10: Tuples And Dictionaries
Program 7: WAP to input your friends’ names 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 names


Chapter 10: Tuples And Dictionaries
Chapter 10: Tuples And Dictionaries
Chapter 10: Tuples And Dictionaries
Chapter 10: Tuples And Dictionaries
Program 8: WAP to create a list of tuples from given list having number and its cube in each tuple.
Chapter 10: Tuples And Dictionaries
Program 9: WAP to sort dictionary key and values list.
Chapter 10: Tuples And Dictionaries
Program 10: WAP to merge to given dictionaries.
Chapter 10: Tuples And Dictionaries
Program 11: WAP to convert a list into a dictionary.
Chapter 10: Tuples And Dictionaries
Program 12: WAP to delete a key from the dictionary.

You might also like