Skip to content
πŸ“š Free notes, MCQ tests & past papers β€” FBISE & BISE Rawalpindi
πŸ“’ Latest Updates

FBISE 9th Class Computer Science Unit 3 Programming Fundamentals: Short and Long Questions with Answers 2027

Reviewed by Sadia Shahid, Senior Science teacher (Maths, Physics, Chemistry, Biology, Computer Science)

Here are the important short and long questions of Unit 3, Programming Fundamentals, from the Federal Board (FBISE) 9th Class Computer Science course (SSC-I, Matric Part I), solved in full for the Annual Examination 2027.

Unit 3: Programming Fundamentals
Class 9th Class (SSC-I), Federal Board
Subject Computer Science
Contents Short and long questions with answers
Exam FBISE Annual Examination 2027

Short Questions with Answers: Unit 3

3.1 Introduction

Q1. Write down any two differences between static website and dynamic website.

Marks: 02

Q2. Differentiate between a static and a dynamic website.

Marks: 1.5 +1.5

Q3. Briefly explain the role of front-end development in a web project.

Marks: 03

Q4. How does back-end development support a web application?

Marks: 02

Q5. State two differences between a static website and a dynamic website.

Marks: 02

Q6. Differentiate between static and dynamic websites. (Any two points)

Marks: 02

3.2 HTML

Q1. Write down HTML tags to display ‘Software’ as a main heading and make an ordered list as follows:

1. System Software

2. Application Software

Marks: 03

Q2. Correct any four errors in the given code of HTML.

<html>

</head></title>Main Page<title>

</head>

</body>

<p> Introduction about the page<p>

</body>

<html>

Marks: 02

Q3. Correct any four errors in the given code of HTML.

<html>

</head></title>Main Page<title>

</head>

</body>

<h2>Main heading </h1>

<body/>

<html>

Marks: 02

Q4. Correct any three errors in the given code of HTML.

</html>

</head><title>Main page<title>

<head>

</body>

</u>Introduction to Computer < /u>

<body>

<html>

Marks: 1×3

Q5. Write down HTML code to apply headings from h1 to h6.

Marks: 03

Q6. Correct any three errors in the given HTML code:

</html><head>

</title>Heading</title>

<head>

<body>

</h/>Welcome to My Website</h/>

<body>

<html>

Marks: 03

Q7. Write down HTML code to display ordered list as follows:

Memory
1. RAM
2. ROM

Marks: 1+1 +1

Q8. Give one use of hyperlinks in HTML documents. Also write down the syntax for defining a link.

Marks: 1+2

Q9. Write HTML code to display unordered list as follows:

Software
1. System Software
2. Application Software

Marks: 03

Q10. Write a HTML code to produce the following table:

R.No. Name Marks
1 Amna 750
2 Nasir 800
3 Zubia 900

Marks: 02

Q11. What is the purpose of following tags:

<b> , <u>

Marks: 02

Q12. Correct any four errors in the given HTML code:

<html>

<head><title> main page<title><head>

<body>

</p>Introduction of computer <p>

<body>

<html>

Marks: 02

3.3 Cascading Style Sheets (CSS)

Q1. What will be the output of the following HTML code?

<html>

<head>

<title>Output Question </title>

<style>

.text {

font-size: 20px;

color: red; }

</style>

</head>

<body>

<p class=”text”>This is a paragraph.</p>

</body>

</html>

Marks: 03

Q2. How CSS improves the appearance of a web page? Give an example.

Marks: 2+1

3.4 Java Script

let a = 10;

let b = “5”;

console.log(a + b);

console.log(a – b);

Q1. Predict the output of the above JavaScript code. Also explain why the values of both statements are different in terms of JavaScript data types.

Marks: 03

Q2. Identify and correct errors in the following JavaScript code:

let fruits = [“Apple, “Banana”, “Orange”];

console.log(fruits.length)

console.log(fruit.length);

Marks: 03

Q3. Identify and correct errors in the following JavaScript code:

let fruits = [“Apple”, “Banana, “Orange”];

console.log(fruits.length)

console.log(fruit.length);

Marks: 3

Q4. Rewrite the following Java Script code after removing the errors.

<script type=”textjavascript”>

Document.writ(Welcome”);

<script>

Marks: 02

Q5. What will be the output of following JavaScript code?

var age=5;

if (age>3) {

document.write(“Admission granted”); }

else {

document.write(“Admission not granted”); }

Marks: 02

Q6. What is the value of x after the following code is executed in JavaScript?

var x=5;

var y=10;

x=y-3;

Marks: 02

Q7. Rewrite the following Java Script code after removing the errors.

<script type=textjavascript>

document.w(“Hello world”)

<script>

Marks: 02

Q8. Write down any two differences between Number data type and Boolean data type in JavaScript.

Marks: 02

Q9. What will be the output of following JavaScript code?

var marks=45

if (marks >40) {

document.write(“You have Passed”); }

else {

document.write(“You have Failed”); }

Marks: 02

Q10. What is the value of y after the following code is executed in JavaScript?

var y = 10;

var z = y+10;

y=z-5;

Marks: 02

Q11. Why are variables used in Javascript programs? Explain briefly. Give one example.

Marks: 2+1

Q12. Briefly explain the importance of data types in JavaScript. Give one example.

Marks: 2+1

Q13. Write down the output of the following Javascript code:

<script type= “text / javascript”>

var a, b, reward;

reward = 5555;

a= reward %10;

b= reward / 10;

document.write (a, “….”, b);

</script>

Marks: 03

Q14. Produce the output of the following JavaScript code:

let sum=0;

for let i=1; i<=3; i++)

{

sum=sum+i;

}

document.write(sum);

Marks: 02

Q15. Write a JavaScript code to enter a number and find whether it is even or odd.

Marks: 02

Q16. What is the output of following code,

<script language = “javascript”>

document. write(“Computer Science!”)

</script>

Marks: 02

Q17. Write a JavaScript statement to declare and initialize a variable.

Marks: 02

Q18. What is the purpose of operators in JavaScript?

Marks: 02

3.5 Debug The Code

Q1. Why is debugging important in programming?

Marks: 02

Long Questions with Answers: Unit 3

3.2 HTML

Q1. Create a result sheet using HTML that can display the following data in table format.

Roll No Student Name Math English Computer Science Total Marks Percentage
1 Ali Ahmed 78 85 90 253 84.3%
2 Sara Khan 88 79 92 259 86.3%
3 Usman Ali 65 72 70 207 69.0%
4 Ayesha Noor 90 88 95 273 91.0%
5 Hamza Raza 55 60 68 183 61.0%

Marks: 6

Q2. Write an HTML code using the following tags:

<p> <b> <i> <u> <em>

Marks: 05

Q3. Explain the structure of an HTML document and describe the role of the Document Object Model (DOM).

Marks: 3+2

Q4. Write an HTML code to create a webpage with heading paragraph and link.

Marks: 05

3.4 Java Script

Q1. Write a JavaScript function called ‘CalculateGrade’ that takes marks of a student as input and returns grade based on the following grading system: A if marks are greater than or equal to 90, B if marks are between 70 and 89, C if marks are between 50 and 69, and F if marks are below 50.

Marks: 6

Q2. Write a JavaScript program to display the numbers from 1 to 10.

Marks: 05

Q3. Write JavaScript program to display the numbers from 1 to 20.

Marks: 05

Q4. Write down a Javascript code to define two variables and calculate their sum. Also display the result.

Marks: 06

Q5. Write down a Javascript code to display numbers from 0 to 9.

Marks: 06

Q6. Write down the Javascript code to display numbers from 10 to 1.

Marks: 06

Q7. Write a JavaScript program that prints numbers from 10 to 1.

Marks: 05

You can find the other units of 9th Class Computer Science on the main page: FBISE 9th Class Computer Science short and long questions, all units.

Questions follow the FBISE SSC-I Computer Science syllabus and paper pattern. Please confirm all dates and figures on the official website: www.fbise.edu.pk

Need help with 9th Class Computer Science? Join our live online classes for the Federal Board. Book a free demo class.

All chapters of this subject

πŸ“Œ Struggling with this chapter? Join our live online tuition β€” one-to-one or small group classes with experienced teachers. Book a free demo class β†’

Ask a question about this topic

Your email address will not be published. Required fields are marked *