Practice Problem
Practice Problem
An Imaginary Boishakhi Mela is happening in MIST. A group of students from the BME Department went
to the mela but this year there is a ticketing system at the gate. So everyone needs to buy a ticket of 120
Taka each. However, there is a discount for students based on their CGPA. Now they need your help to
create a program that will calculate the ticket price for them.
2.
Yeasir wants to buy an expensive car but he has to do it with his Bank balance. He has been given a blank
cheque in which he can enter the amount he wants to add to his bank balance. Initially, his bank balance is
zero. After adding the amount to his bank balance, he goes to the showroom to buy the car but he doesn’t
know if he will be able to buy the car with the available amount in his bank account. Now he goes to the
showroom and sees there are five types of cars.
The base value of the car is given alongside their name and the tax also which will be added to get to the
total amount of the car. Now Yeasir wants your help to determine whether he will be able to buy the car or
not. You are tasked to make a suitable interface of the showroom showing the cars and then Yeasir can
choose from them. Firstly, there should be a prompt to enter the amount in the bank account.
If Yeasir can buy the car, display the message "Yes I bought it!".
If Yeasir cannot buy the car, display the message "Oops I need to work hard!".
Input
Firstly the input contains the amount ($) that will be added to the bank balance of Yeasir. Then there will be
an interface showing the cars serially and Yeasir can choose from them.
Output
The output should display the bank balance of Yeasir, the total amount of the car, and if he can/cannot buy
the car.
3
A shop named “Loss Products” sells all their products at a loss price. But every time the owner is unable to
calculate the selling price. Now he came to you to write a computer program that can find the selling price
of products on the basis of buying price and loss rate.
4
Shape Area Calculator
Tanvir is tasked with creating a program that calculates the area of various geometric shapes. The program
should prompt the user to input the type of shape and relevant dimensions, then compute and display the
area accordingly. But Tanvir was inattentive in the class as always and that’s why he needs your help. Now
help Tanvir to make the shape calculator and write the program for him.
Input:
The user will input the type of shape - rectangle, circle, square, triangle, parallelogram, rhombus
For each shape, the user will provide the necessary dimensions. For example:
Output:
The program should output the calculated area of the specified shape.