Skip to content

Programming for Business Analytics

BA · Midterm · Summer 25

Section 68(A-D)

This browser can’t show the PDF here

Open it, and your phone’s PDF viewer takes it, or download it.

Read the questions as text

Read off the PDF by AI, so it may have mistakes. The PDF is the original.

Daffodil International University Department of Business Administration (BBA) Faculty of Business & Entrepreneurship Midterm Examination, Summer 2025 Course Code: 0613-114; Course Title: Programming for Business Analytics Sections & Teachers: 68(A-D), All Time: 1 Hour 30 Mins Marks: 25 Answer All Questions [The figures in the right margin indicate the full marks and corresponding course outcomes. All portions of each question must be answered sequentially.] 1. Explain the different types of arithmetic and conditional operators used in programming, and illustrate their usage with relevant examples. 3 CLO-1 L-2 Mina is trying to learn Python programming but is having difficulty understanding how to define a variable. As a fellow learner, explain to Mina how to properly declare and use a variable in Python with an appropriate example. 3 Explain the various data types that Python supports. Provide examples to illustrate each type. 2 2. Construct a Python program that takes input for a product's name and its price from the user. Then, display the output in a formatted string as shown below. 2 Sample Input Product: Chocolate Price: 50.00 | Sample Output Product: Chocolate | Price: 50.00 BDT There are N children in a classroom, and the teacher has K chocolates to distribute equally among them so that each child receives the same number of chocolates. If the chocolates cannot be divided evenly, the remaining chocolates will stay with the teacher. Construct a Python program that reads two integers N (number of children) and K (number of chocolates), then calculates and prints how many chocolates each child will get and how many will remain with the teacher. 3 Sample Input 6 20 | Sample Output 3 2 As a shop manager, you want to track the performance of each sale. Construct a Python program that takes the cost price and the selling price of an item as input, and then determines whether the transaction resulted in a profit, loss, or no gain/loss. Print an appropriate message based on the result. 3 CLO-2 L-3 Sample Input Cost Price: 100 Selling Price: 120 | Sample Output Profit of 20 You receive a sales value as a string input from a software system (e.g., "5500"). Construct a Python program that converts this string to a numeric value, calculates a 27% discount, and displays the final price after the discount. This type of calculation is frequently used in sales and marketing applications. 3 Sample Input 5000 | Sample Output Final Price after 27% discount: 3650.0 e) A public library charges different fees based on the visitor's category. Construct a Python program that takes the visitor's number representing their category and prints the corresponding fee in BDT according to the following rules: 4 - Category number less than 10: Fee is free - Category number between 10 and 17: 50 BDT - Category number between 18 and 59: 150 BDT - Category number 60 or more: 70 BDT Sample Input 65 | Sample Output Fee: 70 BDT The following Python code is intended to assign grades based on marks but contains several syntax errors. Identify and fix the errors to ensure the program runs correctly and prints the appropriate grade. 2 marks = input() elif marks >= 90 print("A+ Grade") elif marks > 80 print("A Grade") else: print("Below A Grade")