Class 10 Computer Science: Chapter 1 – Computer Science

Solved Long Questions covering logical puzzles, abstract mapping, basic programming functions, web form validation, and budget calculation analysis.

Back to Chapter 1 MCQs

Class 10 Chapter 1: Long Question Answers (Computer Science)

1. Ejaz, Javeria, Liaqat, and Zainab are standing in a line. Clues are:

  • a) Javeria is standing directly behind Ejaz.
  • b) Zainab is not next to Liaqat.
  • c) Liaqat is not at the end of the line.
  • d) Zainab is standing in the first position.

Answer: Zainab - Ejaz - Javeria - Liaqat

πŸ“Œ Explanation in Urdu:

  • Clue 1: Zainab pehle position par hai.
  • Clue 2: Ejaz ke foran peeche Javeria hai.
  • Clue 3: Liaqat last (4th) position par nahi ho sakta.
  • Clue 4: Zainab aur Liaqat aapas mein saath nahi honay chahiye.

Sirf Zainab - Ejaz - Javeria - Liaqat yehi order hai jo sab clues ko satisfy karta hai.

2. Provide students with a detailed map of their school. Ask them to create an abstract version, highlighting only the main buildings and pathways.

Answer: Students should be given a printed or drawn map of the school with all buildings, classrooms, and pathways. They should identify and highlight the main areas only, such as classrooms, library, principal’s office, playground, and corridors.

Then, using symbols or boxes, they can redraw a simpler abstract map focusing only on the important places and connections.

πŸ“Œ Urdu Explanation: Abstract map ka matlab hota hai ek simple version, jisme sirf zaroori cheezein show hoti hain β€” jaise school ka overview without details.

3. Give students a problem that can be solved with a simple program. Encourage them to write functions to handle different parts of the problem, abstracting complex operations into manageable pieces.

Answer:

Problem Example: "Calculate the average marks of a student in 5 subjects."

NBF STUDYHUB Step-by-step Plan:

  1. Input marks for 5 subjects
  2. Function 1: Take input of marks
  3. Function 2: Calculate total
  4. Function 3: Calculate average
  5. Display the result

Benefits of using functions:

  • Har part ko alag function bana kar problem ko manageable bana sakte hain
  • Code reusable aur easy to read hota hai
  • Students ko function writing ki practice milti hai

πŸ“Œ Urdu Explanation: Students ko kehna chahiye ke woh ek chhota program banayein jaise ke "marks ka average calculate karna", jisme woh har kaam ke liye separate function likhein. Jaise input lena, total calculate karna, average nikaalna β€” sab ko alag functions mein likhna chahiye.

4. Given the following web form inputs, identify any syntax errors and correct them:

  • Name: Amjad Ali
  • Email: amjadali@gmail
  • Date: 01/01/2024

Answer:

Errors:

  1. Name: No error (Correct)
  2. Email: Syntax Error β€” Missing domain
    ❌ amjadali@gmail
    βœ… Corrected: amjadali@gmail.com
  3. Date: No error (Correct format: DD/MM/YYYY)

βœ… Final Correct Form Inputs:

  • Name: Amjad Ali
  • Email: amjadali@gmail.com βœ…
  • Date: 01/01/2024

5. You have developed a web application that takes the budget head and provides total. Analyse the following budget and identify any logical errors in the total amount.

Given Budget:

  • Rent: $1000
  • Utilities: $150
  • Groceries: $200
  • Total: $1000 + $150 + $200 = $1500

βœ… Correct Calculation:

Let’s add the values: 1000 + 150 + 200 = 1350
But total is written as 1500 β€” ❌ This is a logical error.

βœ… Corrected Budget:

  • Rent: $1000
  • Utilities: $150
  • Groceries: $200
  • βœ… Correct Total = $1350