PSG COLLEGE OF TECHNOLOGY
DEPARTMENT OF COMPUTER APPLICATIONS
BE ECE G1 - 23L205 OBJECT ORIENTED PROGRAMMING WITH PYTHON
PROBLEM SHEET BASED ON OPERATORS
1. Write a program to calculate the total amount of money in the piggybank, by getting the
input for the number of coins of Rs.10, Rs.5, Rs.2, Rs.1.
2. Write a program to calculate the bill amount for an item by getting input for the quantity
sold, value, discount,tax. Display the bill in the following format.
3. Write a program to calculate a student’s result based on two examinations, one sport event
and three activities conducted. The weightages are Examination 50%, Sports 20% and
Activities 30%.
4. Write a program that prompts the user to enter a number between 1 – 7 and the displays the
corresponding day of the week.
5. Write a program to take input from the user and then check whether it is a number or a
character. If it is a character, determine whether it is in uppercase or lowercase.
6. Write a program to calculate the area of a triangle using Heron’s formula.
(Hint: Heron’s formula is given as: area= sqrt(s*(s-a)* (s-b)* (s-c)))
[Link] a program to calculate the tax with the given conditions
8. Given the following assignment: x = 2 and find the output for the following Python
statements.
(a) print("x")
(b) print(‘x’)
(c) print(x)
(d) print("x + 1")
(e) print(‘x’ + 1)
(f) print(x + 1)