0% found this document useful (0 votes)
5 views2 pages

Practice Problem

The document outlines four programming tasks: calculating ticket prices for a Boishakhi Mela based on student CGPA, determining if Yeasir can buy a car based on his bank balance and car prices, calculating selling prices for products sold at a loss, and creating a shape area calculator for various geometric shapes. Each task includes sample inputs and outputs to guide the programming requirements. The tasks emphasize user interaction and computation based on provided data.

Uploaded by

tle.coder
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)
5 views2 pages

Practice Problem

The document outlines four programming tasks: calculating ticket prices for a Boishakhi Mela based on student CGPA, determining if Yeasir can buy a car based on his bank balance and car prices, calculating selling prices for products sold at a loss, and creating a shape area calculator for various geometric shapes. Each task includes sample inputs and outputs to guide the programming requirements. The tasks emphasize user interaction and computation based on provided data.

Uploaded by

tle.coder
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/ 2

1.

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.

Discount (%) = 1 - (Student’s_CGPA / 4)

Sample Input Sample Output

CGPA: 3.50 Ticket Price: 105.00 Taka

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.

1. Mercedes Benz (Base value = $150,000 ; Tax = 25 %)


2. BMW (Base value = $130,000 ; Tax = 30 %)
3. Audi (Base value = $180,000 ; Tax = 28 %)
4. Lamborghini (Base value = $320,000 ; Tax = 40 %)
5. Mahindra (Base value = $20,000 ; Tax = 35 %)

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!".

Follow the sample input and output for guidance.

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.

Sample Input Sample Output

Buying Price: 200 Selling Price: 160


Loss Rate(%) : 20

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:

For a circle: the radius.

For a square: the length of one side.

For a triangle: the base and height or the three sides

For Parallelogram: the base and height (Area= b x h)

For Rhombus: length of two diagonals a and b (Area = ½ x a x b)

Output:

The program should output the calculated area of the specified shape.

You might also like