Computer Fundamentals
CSE · Quiz · Summer 25
Paper 1 of 2By Md. Oliul Islam BappySwitch
Paper 1 of 2
Read the questions as text
Read off the PDF by AI, so it may have mistakes. The PDF is the original.
Course Title | Computer Fundamentals | Course Code | CSE112 | Section |
Marks | 15 | Quiz No: | 03 | Time | 50 minutes
Student ID | | Student Name |
Q1 | You are developing a system for a local library to manage the book-borrowing process. The library allows users to borrow books for a specific duration (e.g., 14 days). The system should perform the following steps:
1. Ask the user to input the book title and the days they want to borrow it.
2. Check if the number of days entered is valid (i.e., greater than 0 but less than or equal to 30).
3. If the number of days is valid:
- Display a message confirming the book borrowing along with the borrowing period.
- Ask if the user wants to borrow another book.
4. If the number of days is not valid:
- Display an error message and ask the user to again enter the number of days.
5. End the process when the user chooses not to borrow another book.
Create a flowchart that outlines the steps of the book borrowing process as described in the scenario. | 6
Q2 | You are asked to write an algorithm and corresponding pseudocode to simulate a basic ATM withdrawal system. The system should allow a user to input their PIN, check account balance, and withdraw money (only if sufficient balance exists). Now critically analyze and answer the following:
1. What are the key steps you would include in your algorithm to ensure both correctness and user security? | 3
2. How would you design the pseudocode to handle incorrect PIN entries (with a limit of 3 attempts) and insufficient balance? | 3
3. Could your pseudocode lead to any logical or runtime errors? Justify your answer. | 3