0% found this document useful (0 votes)
101 views5 pages

Python Practicals - 2022 - 23 - Qs

1. The document provides 20 Python programming problems covering topics like calculating averages and grades from marks, calculating sale prices based on cost and discount percentages, calculating perimeter/circumference of shapes, calculating simple and compound interest, and more. 2. Many problems involve accepting user input to perform calculations on amounts, prices, numbers in lists or dictionaries. Calculations include averages, discounts, interests, profits/losses. 3. Problems also involve creating and manipulating lists and dictionaries - adding/deleting elements, searching for elements, sorting lists, calculating totals from dictionary values.

Uploaded by

David
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)
101 views5 pages

Python Practicals - 2022 - 23 - Qs

1. The document provides 20 Python programming problems covering topics like calculating averages and grades from marks, calculating sale prices based on cost and discount percentages, calculating perimeter/circumference of shapes, calculating simple and compound interest, and more. 2. Many problems involve accepting user input to perform calculations on amounts, prices, numbers in lists or dictionaries. Calculations include averages, discounts, interests, profits/losses. 3. Problems also involve creating and manipulating lists and dictionaries - adding/deleting elements, searching for elements, sorting lists, calculating totals from dictionary values.

Uploaded by

David
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/ 5

PYTHON

1. Write a Python program to input your marks of five subjects (out of 100)
and find the average and grade from the given marks:

Given:

Grades
Average Marks Grades
91 - 100 A
81 – 90 B
71 - 80 C
60 - 70 D
48 - 59 E
Less than 48 F

2. Write a Python program to input an item name, it’s code (integer value)
and cost (floating number) to find the sale price of the item with given cost
and discount (%) as shown below:
Given
The item name should be of string type, code is of integer value and cost is
of floating number.
Also round off the sale price to whole number while printing the output.
Cost Price Discount
3000 - 6000 5%
6000 - 15000 10 %
15000 - 25000 20 %
Above 25000 30%

3. Write a menu driven Python program to calculate perimeter/circumference


of shapes such as triangle, rectangle, square and circle. The program should
continue as long as the user wants.

4. Write a Python program to calculate the Simple Interest and Compound


Interest from the users entered amount (in Rs), rate (in percentage) and
time (in years).
5. Write a Python program to calculate profit-loss for the users entered Cost
and Sell Price. Also iterate the program for all the three cases.

6. Write a Python program to calculate EMI for Amount, Period and Interest
from a user entered amount and time period.
Given: -
E = PR (1+ R) n / ((1+ R) n -1)
where E = EMI;
P = Principal Loan Amount;
R = Rate of interest per Anum., given rate as 0.96 per Anum
n = tenure of loan repayment in months.

7. Write a Python program to calculate tax - GST / Income Tax from a user
entered net price and cost.
Given: -
GST Amount = Net Price – Original Cost
GST Percentage = (GST Amount * 100)/ Original Cost

8. Write a Python program to find the sum of squares of the first 100 natural
numbers.

9. Write a Python program to print the first ‘n’ multiples of given number.

10.Write a Python program to count the number of vowels in a user entered


string.
LIST

11.Write a program to input a number and count the occurrences of that number
in list. Generate the list by accepting five values from the user.

12. Write a program to accept values from the user up to a certain limit
entered by the user; if the number is even, then add it to a list.

13. Write a Python program to find the third largest and smallest number in a
list. Create the list by accepting values from the user up to a certain limit.

14.Write a menu driven program to perform the following using lists:


a) Sort the array in Ascending order.
b) Sort the array in Descending order.
In the program User can input list directly to the program.

15. Write a menu driven program to perform the following. Use Library
functions.
a) At runtime add 5 elements (movie names) to a list and display it.
b) Sort the list and display the list before and after the sort.
c) Insert a new movie name at the desired location and display the
modified list.
d) Check the presence of a movie name in the given list. If present
display its position else display “Movie not found”.
The program should work as many times the user wants.
DICTIONARY

16. Write a Python program that asks the user to enter state names and their
capital to create a dictionary to store names of states and their capitals. Also
search and display the capital for a particular state.

17.Write a Python program to input roll numbers, students name, their total
mark (out of 500) and percentage calculated, to create a dictionary to store
names and marks and display all the details in a tabular form.

18.Write a Python program that asks the user to enter product names and prices.
Store all of these in a dictionary whose keys are the product names and
whose values are the prices. When the user is done entering products and
prices, allow them to repeatedly enter a product name and print the
corresponding price or message if the product is not in the dictionary.

19.Write a program to store item names and their price in a dictionary, delete
a particular item name from the dictionary. Also display dictionary after
deletion.

20.Write a Python program to input names of ‘n’ employees and their salary
details like basic salary, house rent and conveyance allowance. Calculate
total salary of each employee and display.

*******************

You might also like