1 Mark Questions (20)
-
Computerisation refers to:
A. Using computers for calculations
B. Automating routine tasks with computers
C. Storing large data
D. Printing documents
Answer: B. Automating routine tasks with computers -
The first step in problem solving is:
A. Coding
B. Analysing the problem
C. Testing
D. Debugging
Answer: B. Analysing the problem -
GIGO stands for:
A. Garbage In, Garbage Out
B. Great Input, Good Output
C. General Input General Output
D. Graph Input Generated Output
Answer: A. Garbage In, Garbage Out -
An algorithm is a:
A. Set of random steps
B. Step-by-step solution procedure
C. Graphic representation
D. Compiler program
Answer: B. Step-by-step solution procedure -
Flowchart symbol for process is:
A. Diamond
B. Parallelogram
C. Rectangle
D. Oval
Answer: C. Rectangle -
Pseudocode is:
A. Real code for computers
B. Human-readable instructions
C. Machine code
D. Binary numbers
Answer: B. Human-readable instructions -
Flow of control includes:
A. Only sequence
B. Sequence and selection
C. Loop only
D. None
Answer: B. Sequence and selection -
Algorithms must be:
A. Unique and infinite
B. Precise and finite
C. Vague
D. Only graphical
Answer: B. Precise and finite -
Which is the standard decision symbol in a flowchart?
A. Diamond
B. Square
C. Triangle
D. Circle
Answer: A. Diamond -
The output of an algorithm depends on:
A. Colour of flowchart
B. Correctness of input
C. Length of process
D. Programming language
Answer: B. Correctness of input -
An example of a selection statement is:
A. IF-ELSE
B. WHILE
C. PRINT
D. INPUT
Answer: A. IF-ELSE -
Which programming language is not a high-level language?
A. C
B. Python
C. Binary
D. Java
Answer: C. Binary -
In flowcharts, arrows represent:
A. Data input
B. Flow of control
C. Output only
D. Hardware
Answer: B. Flow of control -
Repetition in an algorithm is called:
A. Sequence
B. Loop
C. Conditional
D. None
Answer: B. Loop -
Which one is a benefit of pseudocode?
A. Helps non-programmers review steps
B. Direct computer execution
C. Use of diamonds in code
D. Hardware control
Answer: A. Helps non-programmers review steps -
What is dry run?
A. Flowchart printing
B. Running through the steps of algorithm with test input
C. Debugging only
D. None
Answer: B. Running through the steps of algorithm with test input -
A decision block checks for:
A. Repeated steps
B. Condition true or false
C. Input only
D. Loop count
Answer: B. Condition true or false -
Coding means:
A. Writing algorithm steps in English
B. Translating algorithm into programming language
C. Creating flowchart
D. Generating output
Answer: B. Translating algorithm into programming language -
Time complexity of an algorithm refers to:
A. Memory used
B. Processing time for solution
C. Colour coding
D. Number of symbols
Answer: B. Processing time for solution -
In decomposition, complex problems are:
A. Ignored
B. Broken into sub-problems
C. Repeated
D. Drawn as diamond
Answer: B. Broken into sub-problems
2 Mark Questions (20)
-
What does GIGO imply in computing?
Answer: If input data is faulty or incorrect, the output produced will also be faulty. Ensures importance of correct input. -
List two methods for representing algorithms.
Answer: Flowcharts and pseudocode. -
State two benefits of algorithm verification.
Answer: Finds errors early, ensures solution correctness for all input cases. -
What are the three main types of flow in control structures?
Answer: Sequence, selection (decision), repetition (loop). -
Give two characteristics of a good algorithm.
Answer: Precision in steps, finiteness (must terminate). -
How do flowcharts help programmers?
Answer: They provide a visual way to organize and understand steps in an algorithm. -
What is a high-level programming language? Give two examples.
Answer: Languages close to human language, easy to write/read. Examples: Python, Java. -
State main difference between sequence and selection in algorithms.
Answer: Sequence executes every step in order; selection chooses among steps based on condition. -
Name two common flowchart symbols with their functions.
Answer: Rectangle for process/action; diamond for decision/condition. -
Write two benefits of decomposition in problem solving.
Answer: Solves complex tasks efficiently by breaking into manageable parts; allows parallel development. -
What is the role of testing and debugging?
Answer: Testing finds errors; debugging fixes errors to perfect the program. -
State two reasons for writing pseudocode before actual code.
Answer: Clarifies steps for programmer, allows review for improvement. -
How can repetition/iteration be implemented in pseudocode?
Answer: Using WHILE or FOR constructs to repeat steps till condition is met. -
Give two examples where selection statements are used.
Answer: Voting eligibility (age), class assignment (marks). -
Explain the concept of dry run with an example.
Answer: Testing algorithm steps manually with input. Eg: Finding if 6 is even by applying MOD 2. -
Define time and space complexity.
Answer: Time complexity – how long to execute. Space complexity – memory needed to run. -
How does a flowchart indicate start and end?
Answer: Oval symbol (Terminator) for start/end. -
What does the input/output block represent in flowcharts?
Answer: Parallelogram symbol, shows data entered or output displayed. -
Why is coding needed after algorithm and flowchart?
Answer: To translate logical steps into machine-executable instructions using a programming language. -
List two key steps for problem solving using computers.
Answer: Analyse the problem; develop and represent an algorithm.
3 Mark Questions (20)
-
Explain the difference between flowchart and pseudocode with examples.
Answer: Flowchart: Diagram with shapes/arrows; e.g., rectangle for process. Pseudocode: Stepwise instructions in human language; eg: INPUT, COMPUTE, PRINT steps. -
List and briefly explain three flowchart symbols.
Answer: Oval – start/end, Rectangle – process/action, Diamond – decision/condition. -
Describe the role of decomposition using a railway reservation system.
Answer: Breaks system into train info, booking module, billing, security, etc.—each handled separately, combined for complete solution. -
What steps are involved in algorithm verification and why is it important?
Answer: Run through steps with test values (dry run), correct mistakes, anticipate edge cases—avoids faulty final programs. -
How does a programmer select the best algorithm out of several options?
Answer: Compare algorithms' time/space complexity; choose one that solves problem efficiently with minimal resources. -
Discuss the importance of testing and debugging with example.
Answer: Finds faulty logic/syntax; fixes errors before user uses software; ensures reliable program operation. -
Why is time complexity vital in algorithm choice for large datasets?
Answer: Faster algorithms process data quickly, saving resources and time for large inputs. -
Describe an example where conditionals are used in algorithm design.
Answer: Eligibility for voting based on user’s age—if age ≥ 18 then eligible; else not. -
How is repetition helpful in computer programs? Give an example.
Answer: Enables regular or repeated tasks; eg: Print numbers 1 to 20 using FOR loop. -
Distinguish between coding and pseudocode in the programming process.
Answer: Coding: Written in programming language for computer execution. Pseudocode: Human language, acts as plan before actual code. -
Write a simple algorithm and flowchart to calculate average of N numbers.
Answer: Algorithm: Input N, loop for N times to sum numbers, divide sum by N. Flowchart: Use loop/decision symbols to repeat input and sum. -
Describe the concept of sequence, selection, repetition with examples.
Answer: Sequence: Steps done in order (calculate sum).
Selection: Choose based on condition (if age > 60: senior).
Repetition: Steps repeated (print all items). -
In your own words, why is GIGO especially important to programmers?
Answer: Ensures solutions are reliable; poor input leads to unexpected/bad output regardless of algorithm accuracy. -
How does dry run help before real coding?
Answer: Reveals logic mistakes, missing cases, helps improve/finalise the algorithm. -
Compare two methods for checking prime numbers algorithmically.
Answer: Method 1: Check divisibility by all numbers up to N.
Method 2: Check only up to √N.
Method 2 is faster. -
Describe the progression from algorithm to testing, with an example.
Answer: Write algorithm, create flowchart, code, test with inputs (dry run), debug and finalize—e.g., bill calculation. -
How does representation of problems improve understanding among programmers?
Answer: Visual (flowcharts) or textual (pseudocode) helps clarify logic, ensures easy teamwork, review, and corrections. -
Why is space complexity sometimes more important than time complexity?
Answer: For embedded/low-memory devices (e.g., smart cards), saving memory is critical even if it takes a little more time. -
Give a real-world example where repetition in an algorithm is required.
Answer: Collecting money till a target amount (e.g., WHILE sum < 200: collect money). -
How do high-level languages simplify algorithm implementation?
Answer: Provide easy syntax, portability across systems, rapid development, easier to debug and maintain than binary or assembly.
5 Marks Questions
1. Explain in detail all the steps of computer-based problem solving, with examples.
Answer:
The process includes:
-
Analysing the problem: Understanding data, requirements, and outputs; e.g. identifying user needs in a ticket booking system.
-
Algorithm development: Breaking the problem into stepwise actions or logic (e.g. searching for available trains, reserving seats).
-
Representation: Using flowcharts or pseudocode to depict the logic—makes steps clear for teamwork and review.
-
Coding: Translating the solution to a programming language like Python or C++.
-
Testing and debugging: Verifying with sample data and correcting errors to ensure reliability.
-
Maintenance: Updating and fixing issues after deployment. Real-world: Railway reservation software follows all these steps for continued usability.
2. Describe the characteristics of a good algorithm and illustrate with an example.
Answer:
A good algorithm is precise, finite (always terminates), has defined inputs and outputs, is effective (solves the problem for all inputs), and unique (produces predictable results). Example: Algorithm to calculate factorial of N:
-
Input N
-
Set result = 1
-
Repeat N times: result = result × current number
-
Output result
Each step is clear and always leads to a correct and finite answer.
3. Discuss flowcharts, list standard symbols, and give an example.
Answer:
Flowcharts use visual symbols:
-
Oval: Start/End
-
Rectangle: Processing
-
Diamond: Decision
-
Parallelogram: Input/Output
-
Arrows: Flow of control
Example: Flowchart for adding two numbers: -
Start
-
Input number 1
-
Input number 2
-
Add
-
Output result
-
End
Benefits include clarity, error detection, and serving as documentation.
4. Explain the importance and method of verifying algorithms with practical examples.
Answer:
Verification (e.g., through dry runs) checks that an algorithm works for all possible inputs and finds overlooked scenarios. Example: Calculating the time sum (hh:mm) for journeys. If total minutes exceed 60, adjust hours and minutes. Testing with boundary cases (e.g., minute overflow) catches logical errors, supporting robust program design.
5. Compare multiple algorithms for prime number checking and discuss their efficiency.
Answer:
-
Full division: Check all divisors from 2 to N–1 (slow for large N).
-
Half division: Only check up to N/2.
-
Sqrt division: Only up to √N (much faster).
-
Prime list method: Check divisibility by prime numbers below N.
Efficiency improves dramatically with sqrt method and prime list, especially for cryptography or large datasets. Choice depends on program constraints (speed vs memory).
6. Explain decomposition in problem solving and give a real-world example.
Answer:
Decomposition splits complex tasks into simpler sub-tasks. For Railway Reservation:
-
Train info
-
Booking/cancellation
-
User authentication
-
Billing
Each sub-system can be managed and developed separately, simplifying testing, debugging, and team collaboration.
7. Give a detailed example of algorithm writing and flowchart creation for average of N numbers.
Answer:
Algorithm:
-
Input N
-
Set sum = 0
-
Repeat N times: Input number, add to sum
-
Average = sum / N
-
Output average
Flowchart:
Start → Input N → Initialize sum → Loop N times: Input number, add to sum → Calculate average → Output average → End
8. Describe sequence, selection, and repetition structures with examples, flowcharts, and typical use.
Answer:
-
Sequence: Steps done in order (e.g., sum = a + b → print sum).
-
Selection: Use decisions (diamond symbol). E.g., IF age >= 18, print "Eligible".
-
Repetition: Loop structures (arrows looping back). E.g., WHILE i ≤ 5: print i.
Flowcharts visually separate these with distinct symbols and arrows.
9. Discuss the significance of testing and debugging in program development.
Answer:
Testing uses real and edge-case inputs to find errors; debugging corrects them. This cycle is repeated until software performs as expected under all scenarios. E.g., online banking requires rigorous testing to prevent transaction errors. Types: unit, integration, system, acceptance.
10. List and explain advantages of high-level programming languages.
Answer:
High-level languages (Python, Java) provide easier syntax, portability, rapid development, better debugging tools, and a large library ecosystem. Developers can focus on logic instead of hardware specifics, and programs run on different platforms with minimal changes.
11. How does dry run help in algorithm verification? Illustrate with example.
Answer:
A dry run simulates execution with sample data, step by step, to check for logic errors. E.g., in sum algorithm, test inputs like (2,0), (5,7) to ensure program correctly sums, handles zeros, and negative values before coding.
12. Why is GIGO crucial for programmers? Explain with examples.
Answer:
Garbage In Garbage Out means invalid input produces invalid output, regardless of algorithm quality. Thus, validating and sanitising input (e.g., checking for negative values in age or zero division) is essential for reliable programs.
13. Detail the significance of representing algorithms using pseudocode before coding.
Answer:
Pseudocode helps clarify logic, allows team review, and catches missing or unclear steps before programming. It acts as a bridge between planning and implementation, facilitating maintenance and updates.
14. Explain two main steps for effective problem solving in computer science.
Answer:
-
Analysis: Understand requirements, gather all constraints, define inputs/outputs.
-
Algorithm development: Create stepwise instructions, choosing efficient and robust logic, ready for translation into code.
15. Give three common flowchart symbols and explain their practical utility.
Answer:
-
Oval: Marks start/end, ensuring clear program boundaries.
-
Rectangle: Shows action/processing for easy tracking of computation steps.
-
Diamond: Represents decision points, allowing branching for complex logic.
Combined, these symbols ensure transparency and reduce programming errors.
16. List out and explain two real-life scenarios that require decomposition for computer solutions.
Answer:
-
Weather Monitoring: Subsystems for sensor data, forecasting, alerting, and reporting.
-
School Management System: Modules for attendance, grading, admin, library.
Decomposition makes these large systems feasible and maintainable.
17. Discuss how repetition/iteration is used in algorithms with relevance to daily life.
Answer:
Repetition handles tasks like collecting funds until a target is reached, printing numbers up to N, or processing a list of items. It ensures efficiency and code simplicity for regularly repeated work.
18. How do programmers choose between time and space complexity in algorithm selection?
Answer:
If hardware is limited (e.g., embedded devices), space matters more—even if slower. For data-heavy tasks, time matters more for speedy results. Programmers weigh trade-offs, sometimes sacrificing speed for lower memory usage or vice versa.
19. Explain the concept of coding as the final step and its importance in programming.
Answer:
Coding translates logic into machine-readable instructions using a language’s syntax. It finalises the algorithm for execution, and marks the transition from planning to development and ultimately deployment.
20. Compare two methods of checking prime numbers algorithmically and discuss their potential drawbacks.
Answer:
-
Brute-force (check all numbers up to N): Easy to understand, but slow for large N, not ideal for big datasets.
-
Sqrt method: Much faster, but requires knowledge of math; may still be slow for huge numbers unless optimised (e.g., use of prime lists).
Drawbacks revolve around resource use, scalability, and complexity.
.png)
Comments
Post a Comment