0% found this document useful (0 votes)
14 views

Chapter 4 Introduction To Programming Concepts Worksheet 1

worksheet

Uploaded by

uiscompdep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Chapter 4 Introduction To Programming Concepts Worksheet 1

worksheet

Uploaded by

uiscompdep
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Subject: Computer Grade: 7

Assessment Type: Formative Title: Introduction to programming


language concepts
Teacher Name: Faisal Mehmood Issued Date: 06/10/2024
Student Name:
1. What is a programming language?
A) A language used for speaking
B) A language used to write computer programs
C) A type of software
D) A way to write emails

2. Which of the following is a popular programming language?


A) HTML
B) CSS
C) Python
D) All of the above

3. Which part of a computer program tells the computer what to do?


A) Variable
B) Function
C) Command
D) All of the above

4. What do we call a set of instructions given to a computer?


A) Code
B) Data
C) File
D) Document

5. In programming, what is a 'variable'?


A) A number that never changes
B) A storage location that can hold different values
C) A type of error
D) A command to display information

6. Which of the following is NOT a programming language?


A) Java
B) Python
C) Microsoft Word

Page 1 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


D) C++

7. What does 'debugging' mean in programming?


A) Writing new code
B) Finding and fixing errors in the code
C) Running the program
D) Saving the program

8. Which of the following is a common use of programming languages?


A) Creating websites
B) Making video games
C) Developing applications
D) All of the above

9. Which of the following is a high-level programming language?


A) Assembly
B) C++
C) Machine code
D) Binary

10. What do we call a sequence of instructions written in a programming language?


A) Algorithm
B) Code
C) Function
D) Program

11. In programming, what is a 'loop'?


A) A way to repeat a set of instructions
B) A type of error in the code
C) A variable that stores numbers
D) A command to stop a program

12. Which symbol is commonly used to denote the beginning of a comment in Python?
A) //
B) /*
C) #
D) <!--

13. What does the term 'syntax' refer to in programming?


A) The meaning of the code
B) The structure and rules of writing code
C) The speed of the program
D) The comments in the code

Page 2 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


14. Which of the following is NOT a programming language?
A) Java
B) HTML
C) Python
D) Windows

15. What is the purpose of a 'function' in programming?


A) To store data
B) To perform a specific task
C) To create a variable
D) To write comments

1. : A programming language is used to write instructions that a computer can understand. _______

2. : Python is an example of a low-level programming language. _______

3. : In programming, a 'bug' refers to an error or mistake in the code. _______

4. : All programming languages are exactly the same and can do the same things. _______

5. : An algorithm is a step-by-step procedure for solving a problem. _______

6. : You can only use programming languages on desktop computers, not on mobile devices. _______

7. : Variables in programming can hold different types of data, such as numbers and text. _______

8. : The process of checking and fixing errors in a program is called compiling. _______

9. :A programming language is a way to communicate with computers. _______

10. : Java and Python are examples of programming languages. _______

11. : In programming, a 'variable' can only hold numbers. _______

12. : Debugging is the process of finding and fixing errors in code. _______

13. : HTML is a programming language used to create web pages. _______

Page 3 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


14. : A loop in programming is used to repeat a set of instructions. _______

15. : Syntax refers to the meaning of the code. _______

16. : All programming languages are case-sensitive, meaning that uppercase and lowercase letters are treated
differently._______

Book exercise

B. Explain the difference between the following.


Assembler and compiler:
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………….
Compiler and interpreter
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………….
Source code and object code
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………….

Page 4 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


Procedural programming and Object-oriented programming
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………….

Write answer of the following Questions


1.What is a program?
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
2.Name the five-computer generation language.
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………….
3.State any two point of first-generation language.
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
4. What are the important features of fourth generation language?
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………

5. State the advantages of object-oriented programming.


…………………………………………………………………………………………………………………………………………
…………………………………………………………………………………………………………………………………………
………………………………………………………………………………………………………………………………………

Page 5 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


Answer Key

1. Answer: B) A language used to write computer programs


2. Answer: D) All of the above
3. Answer: D) All of the above
4. Answer: A) Code
5. Answer: B) A storage location that can hold different values
6. Answer: C) Microsoft Word
7. Answer: B) Finding and fixing errors in the code
8. Answer: D) All of the above
9. Answer: B) C++
10. Answer: D) Program
11. Answer: A) A way to repeat a set of instructions
12. Answer: C) #
13. Answer: B) The structure and rules of writing code
14. Answer: D) Windows
15. Answer: B) To perform a specific task

True or false

1. Answer: True
2. Answer: False
3. Answer: True
4. Answer: False
5. Answer: True
6. Answer: False
7. Answer: True
8. Answer: False
9. Answer: True
10. Answer: True
11. Answer: False
12. Answer: True
13. Answer: False (HTML is a markup language, not a programming language.)
14. Answer: True

15. Answer: False (Syntax refers to the rules that define the structure of the code.)

16. Answer: False (While many are case-sensitive, not all programming languages are.

A. 1. True 2. False 3. False 4. False 5. True

B
1. Assembler and Compiler
An assembler is a utility software program which is used to convert a program written in assembly
language into machine language and vice-versa whereas a compiler is a utility software program that
transforms the source code written in high-level language into machine language (object code) that a
computer can understand.
2. Compiler and Interpreter

Page 6 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood


The compiler converts the entire source code into object code in one attempt and generates
the error-list with line numbers Whereas an interpreter is a utility software program that
translates the source code into intermediate code and immediately executes it line-by-line.
3. Source code and Object code
Source code is the input to the compiler of the language in which it is written whereas the Object code
is the machine executable file having instructions for the machine in the form of binary digits,
generated by the compiler.
4. Procedural programming and Object-Oriented Programming
Procedural programming refers to functions and the execution of the functions in a step-by-step linear
order. whereas in Object Oriented Programming, a program is no longer a series of instructions, but a
collection of objects

C. 1. d 2. c 3. a 4. e 5. b
D
1.What is a program?
A program is a set of instructions written and executed in a specific sequence.
2.Name the five computer generation language.
The five generations of computer languages are given below.
a. First generation: Machine Language
b. Second generation: Assembly language
c. Third generation: High level language
d. Fourth generation: Very high level language
e. Fifth generation: Artificial intelligence
3.State any two point of first generation language.
Important points are:
a. First generation computer language is the lowest level of computer language.
b. Information was entered into the computer in the form of long series of 1s or 0s or the binary codes. These
codes can easily be interpreted
4. What are the important feature of fourth generation language?
The important features of fourth generation computer language are:
a. Instructions are written in English-like sentences.
b. These are non-procedural.
c. Increases productivity because programmers type fewer lines of code to get something
done.
5. State the advantages of object-oriented programming.
In Object Oriented Programming approach, programmers can build programs from
pre-existing objects and can use features from one program in another. These results in
faster development and thus it saves time, reduces maintenance costs, and improves
flexibility for future revisions.

Page 7 of 7 Term1 (2024-2025) Computer (UIS Intermediate) Grade 7 Faisal Mehmood

You might also like