Skip to main content

Posts

Featured

Use case based programming exercises

📝 Use‑Case based exercises for programmers 1. CafĂ© Billing System Scenario: A cafĂ© sells coffee at ₹120 per cup and tea at ₹80 per cup. Task: Write a program that asks the customer how many coffees and teas they ordered, then prints the total bill. Hint: Identify variables for quantities, unit prices, and total amount. Use arithmetic operators. 2. Student Result Checker Scenario: A student’s exam score is entered. Task: Print “Pass” if marks ≥ 50, otherwise “Fail”. Hint: Use relational operators and an if-else statement. 3. Traffic Signal Decision Scenario: A traffic light shows either Red, Yellow, or Green. Task: Based on the input, print “Stop”, “Get Ready”, or “Go”. Hint: Use conditional statements ( if-else or switch ). 4. Discount Eligibility Scenario: A shop gives a 10% discount if the purchase amount is more than ₹1000. Task: Ask the user for purchase amount and print final price after discount if eligible. Hint: Use relational operators ...

Latest Posts

MySQL Exercises with data and queries

MySQL Exercises

MySQL Exercises - Student and Product tables

Parking Lot System – Workflow Diagram