0% found this document useful (0 votes)
8 views26 pages

Python Programs

The document contains a series of programming tasks in Python, each requiring the creation of a specific program with defined outputs. Tasks include deleting elements from a list, replicating and sorting lists, finding minimum elements, creating dictionaries from common keys, and various mathematical and logical checks. Additionally, there are tasks related to user input and conditional checks, such as determining eligibility for a driving license and identifying leap years.

Uploaded by

kumar0210rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views26 pages

Python Programs

The document contains a series of programming tasks in Python, each requiring the creation of a specific program with defined outputs. Tasks include deleting elements from a list, replicating and sorting lists, finding minimum elements, creating dictionaries from common keys, and various mathematical and logical checks. Additionally, there are tasks related to user input and conditional checks, such as determining eligibility for a driving license and identifying leap years.

Uploaded by

kumar0210rajesh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

PYTHON

PROGRAM
S
Q1. Write a program that displays options for deleting
elements in a list with option for : if element is to be
deleted with value or by using its position or a list slice
is to be deleted.

PROGRAM:

OUTPUT:
Q2. Write a program that enters a list , replicates it
twice and then prints the sorted list in ascending and
descending orders.
PROGRAM:

OUTPUT:

Q3. Write a program to find the minimum element from


a list of elements along with its index in the list .
PROGRAM :

OUTPUT :

Q4. Write a program to create a third dictionary from


two dictionaries having some common keys , in way so
that the values of common keys are added in the third
dictionary.

PROGRAM :
OUTPUT :

Q5 . Predict the output

Program :
Output :

Q6 . input three angles and determine if


they are forming a triangle or not.
Program :
Output :

Q7. Write a program to check the year


entered by the user is a leap year or not.
Program :
Output :

Q8. Write a program that takes the name


and age of the user as input and displays a
message whether the user is eligible to
apply for a driving license or not.
Program :

Output :

Q9.write a program to find the sum of first


100 natural numbers.
Program :
Output :

Q10.write a python code to add the odd


numbers up to a given value N and print
the result.
Program :
Output :

Q11. Write a program to find those number


which are divisible by 7 as well as by 5 , 500
and 700 .
Program :
Output :

Q12. Write a program to print only then


even numbers from a sequence of numbers:
[0,1,1,2,3,5,8,13,21,34]

Program :
OUTPUT :

Q13. Write a program to print the table of a


given number. The number has to be
entered by the user .

PROGRAM :

Output :
Q14. Given a sequence of numbers [1,7,5,8]
. write a program that prints the sum of 1st
element in line 1 , sum of 1st two terms in
line 2 , sum of 1st three elements in line 3
and so on .
Program :

Output :
MYSQL
QUERIES
1.

2.
3.
4.

5.
6.

7.
8.
9.
10.
11.

12.
13.

14.

You might also like