0% found this document useful (0 votes)
4 views10 pages

Python Project File 2nd Term

The document outlines a Python project for the 2nd term, focusing on creating and manipulating lists, tuples, and dictionaries. It includes tasks such as adding, removing, and iterating through list elements, calculating areas, percentages, and factorials, as well as managing employee data and team statistics in dictionaries. Additionally, it covers creating dictionaries for month names and student details, emphasizing practical programming exercises.

Uploaded by

mukesh Luthra
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)
4 views10 pages

Python Project File 2nd Term

The document outlines a Python project for the 2nd term, focusing on creating and manipulating lists, tuples, and dictionaries. It includes tasks such as adding, removing, and iterating through list elements, calculating areas, percentages, and factorials, as well as managing employee data and team statistics in dictionaries. Additionally, it covers creating dictionaries for month names and student details, emphasizing practical programming exercises.

Uploaded by

mukesh Luthra
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
You are on page 1/ 10

Python project file 2nd term

 To create a python list

 List Items of Different Types


 Slicing of a List in Python

 Add Elements to a Python List


 To Add Elements at the Specified Index

 To change Change List Items

 To Remove an Item From a List

 Iterating Through a List


 To print A list containing the squares of
the integers 1 through 50.

 To Write a program that accepts the


radius of a circle and prints its area

 To Write a program that inputs a student’s


marks in three subjects (out of 100) and
prints the percentage marks.

 To Write a program to accept the year and


check if it is a leap year or not.
o To Write a program to calculate and print
the roots of a quadratic equation
ax²+bx+c=0.(a≠0)
 To Write a program to calculate the factorial
of a number.
Tuple
 To Create a Python Tuple

 To Write a Python program to test if a variable is a list or


tuple or a set.

 To Write a Python program which accepts a sequence of


comma-separated numbers from user and generate a list
and a tuple with those numbers.


 To write a python program to print sum of tuple
elements.

 To Write a python program to Check if the given element is


present in tuple or not.
Dictionary

 To Create a Dictionary

 To Add Items to a Dictionary

 To Remove Dictionary Items


 Write a program to enter names of employees and their
salaries as input and store them in a dictionary.

 Repeatedly ask the user to enter a team name and how many games the team
has won and how many they lost. Store this information in a dictionary where
the keys are the team names and the values are lists of the form [wins,
losses].
 Using the dictionary created above, allow the user to enter a team name and
print out the team's winning percentage.
 Using the dictionary, create a list whose entries are the number of wins of
each team.
 Using the dictionary, create a list of all those teams that have winning
records.
 Create a dictionary whose keys are month names and whose values are the
number of days in the corresponding months.
 (a) Ask the user to enter a month name and use the dictionary to tell how
many days are in the month.
 (b) Print out all of the keys in alphabetical order.
 (c) Print out all of the months with 31 days.
 (d) Print out the (key-value) pairs sorted by the number of days in each
month.

 Store the details of 10 students in a dictionary at the same time ? Details


include - rollno, name, marks, grade etc

You might also like