Wednesday, July 9, 2025

SOLVED PABSON Kathmandu [Grade 10] FIRST TERMINAL EXAMINATION-2082 [A]

 

PABSON Kathmandu

            FIRST TERMINAL EXAMINATION-2082

 


 

Subject: Opt. II Computer Science Full Marks: 50

Class: 10                                                         Time: 2 hrs. 

Candidates are required to answer the questions in their own way words as far as practicable. Figures in the margin indicate the full marks.

 

Attempt all questions.

 

Group “A”

 

1. Answer the following question in one sentence:             [6×1=6]

a) What is telecommunication?

The transmission of data and information from one place to another for the purpose of communication is known as telecommunication.

 

b) Mention any two key elements of digital citizenship.

Any two key elements of digital citizenship are:

v  Digital Access: The state of full electronic participation in society.

v  Digital Commerce: The act of promoting the purchase of goods through electronic means.

 

c) List any two common services provided by the internet.

Any two common services provided by the internet are e-mail and e-commerce.

 

d) What is cyber crime?

Cybercrime refers to illegal activities carried out using computers, networks, or the internet, such as hacking, identity theft, online fraud, and spreading malicious software.

 

 

 

e) Define global variables?

Variables which are declared outside the procedure and whose values can be accessed from any procedure or module are called global variables.

 

f) What is modular programming?

Modular programming is a technique which divides program into many small logical, manageable and functional modules or blocks

 

2. Write appropriate technical term for the following: [2×1=2]

a) Mode of communication where both sides communicate alternately. Half Duplex Mode

b) The responsible use of ICT. Digital Citizenship

 

3. Write full form of the following:                                     [2×1=2]

a) ETA – Electronic Transaction Act                               

b) DSL - Digital Subscriber Line

 

Group “B”

 

4. Answer the following question:                           [9×2=18]

a) Define network topology. Sketch a drawing of star topology.

Topology refers to the layout or arrangement of devices within a Local Area Network (LAN).

Drawing of star topology

Description: Image result for star topology

 

 

 

 

b) What is a search engine? Give one example.

A search engine is an online tool that helps users find information on the internet using keywords or phrases, and provide relevant results. E.g. Google.

 

c) Write any four commandments of computer ethics.

Any four commandments of computer ethics are:

v  Do not use a computer to publish fake information.

v  Do not search the file or record of other people.

v  Do not destroy or delete the records of other people.

v  Do not use a computer to steal someone's privacy.

 

d) What is the IT Policy 2072? Write its main purpose.

The IT Policy 2072 B.S. (2015 A.D.) is a national-level policy introduced by the Government of Nepal to guide the development and expansion of Information and Communication Technology (ICT) across the country.

The main purpose of the IT Policy 2072 is to transform Nepal into a knowledge-based society by promoting sustainable development through the widespread use of ICT.

 

e) Mention any two opportunities and two threats of using the internet in daily life.

Two opportunities of using the internet in daily life are:

·         Provides instant access to a wide range of information on various topics.

·         Facilitates instant communication through emails, messaging apps, and video calls with people around the world.

Two threats of using the internet in daily life are:

·         Personal information can be exposed to hackers or misused by online services.

·         Individuals may face harassment or bullying online.

 

f) Write any two possible consequences of breaking cyber law.

Any two possible consequences of breaking cyber law are :

·         A minimum Rs 50,000 to a maximum Rs 3,00,000 in cash fine and six months to three years imprisonment.

·         Difficulty in future employment, education, or partnerships.

 

g) Differentiate between a centralized computer network and a peer-to-peer network.

 

Centralized Computer Network

Peer-to-Peer (P2P) Network

A network where a central server controls access, resources, and communication.

A network where each computer (peer) acts both as a client and a server.

Centralized control – the server manages data and resources.

No central control – each peer manages its own resources.

 

 

h) What is the difference between a hub and a switch?

Hub

Switch

It transmits data slower than switch.

It transmits data faster than hub.

It broadcasts the information packets to all computer connected network.

It transfers packets to only those selected computers connected in network.

 

 

i) Compare traditional mail and e-mail.

 

Traditional Mail (Postal Mail)

E-mail (Electronic Mail)

A physical method of sending written messages or parcels via postal services.

A digital method of sending messages over the internet.

Paper, envelopes, stamps, and postal delivery.

Internet-connected devices and email servers

 

 

 

 

 

 

 

 

5.   Write down the output of the given program and show them in dry run table:                                                                         [2]

DECLARE SUB KAV()

CLS

CALL KAV()

END

 

SUB KAV()

FOR I= 1 TO 5

PRINT I * I;

NEXT I

END SUB

 

 

Dry Run

I=1 to 5

PRINT I * I

1 to 5 yes

1x1=1

2 to 5 yes

2x2=4

3 to 5 yes

3x3=9

4 to 5 yes

4x4=16

5 to 5 yes

5x5=25

6 to 5 no

Loop exits

 

 

 

The output of the program is:

1

4

9

16

25

 

6. Rewrite the given program after correcting the bugs:  [2]

DECLARE  DISPLAY(T$)

T$=COMPUTER”

CALL SUM(T$)

END

 

SUB DISPLAY(T)

FOR C= 1 TO LEN (T$) STEP 2

D$=MID$(T$,C,1)

PRINT D$;

NEXT C

END

 

Debugged Program

 

DECLARE  SUB DISPLAY(T$)

T$=COMPUTER”

CALL DISPLAY (T$)

END

 

SUB DISPLAY(T$)

FOR C= 1 TO LEN (T$) STEP 2

D$=MID$(T$,C,1)

PRINT D$;

NEXT C

END SUB

 

 

7. Study the following program and answer the given questions.                                                                                    [2×1=2]

DECLARE FUNCTION SUM(A)

CLS

A=5

PRINT SUM(A)

END

 

FUNCTION SUM(A)

FOR K= 1 TO A

IF K MOD 2 = 0 THEN

S=S+K

END IF

NEXT K

SUM=S

END FUNCTION

 

Question:

a) How many time loop FOR…. NEXT will execute?

5 times FOR…..NEXT loop will execute.

 

b) List local variable used in the above program.

The local variable used in the above program are A, K and S.

 

Group C

 

8. Convert/Calculate as per the instruction.                       [4×1=4]

i) (55)8 = (?)16                                      ii) (111100)2=(?)8

iii)  (1010 +1101)2 - (110)2            iv) (100111)2  ÷  (110)2 

 

9. Answer the following questions.                                      [4×2=8]

a)   Write a QBASIC program that asks the radius of a cylinder and calculates its area and volume. Create a user defined function to calculate area and sub end sub to calculate volume of cylinder.   [A = 2Ï€r² + 2Ï€rh and V = Ï€r²h]

 

DECLARE FUNCTION AREA(R, H)

DECLARE SUB VOLUME(R, H)

 

CLS

INPUT "Enter radius of the cylinder: ", R

INPUT "Enter height of the cylinder: ", H

PRINT "Surface Area of Cylinder = "; AREA(R, H)

CALL VOLUME(R, H)

END

 

FUNCTION AREA(R, H)

  AREA = 2 * 3.14 * R * (R + H)

END FUNCTION

 

SUB VOLUME(R, H)

  V = 3.14 * R * R * H

  PRINT "Volume of Cylinder = "; V

END SUB

 

 

b)   Write a QBASIC program to ask an integer to find remainder and quotient divided by 5 by using function procedure.

 

DECLARE FUNCTION REMAINDER(N)

DECLARE FUNCTION QUOTIENT(N)

CLS

INPUT "Enter an integer: ", N

PRINT "Quotient when divided by 5 = "; QUOTIENT(N)

PRINT "Remainder when divided by 5 = "; REMAINDER(N)

END

 

FUNCTION QUOTIENT(N)

  QUOTIENT = N \ 5

END FUNCTION

 

FUNCTION REMAINDER(N)

  REMAINDER = N MOD 5

END FUNCTION

 

10. Write a QBASIC program to input the sides of the square and calculate perimeter by using a function.                               [4]

 

 

DECLARE FUNCTION PERIMETER(S)

CLS

INPUT "Enter side of the square: ", S

PRINT "Perimeter of the square = "; PERIMETER(S)

END

 

FUNCTION PERIMETER(S)

  PERIMETER = 4 * S

END FUNCTION

OR

Write a QBASIC program to print the first 10 natural numbers and their sum by using sub end sub procedure.

 

DECLARE SUB SHOW()

 

CLS

CALL SHOW

END

 

SUB SHOW

SUM = 0

FOR I = 1 TO 10

  PRINT I;

  SUM = SUM + I

NEXT I

PRINT "Sum of first 10 natural numbers = "; SUM

END SUB

?ÿ@

Saturday, July 5, 2025

3.2 Introduction to Scratch: Features, Interface, Blocks - Grade 9 Computer Science 2082 - Revised

 3.2 Introduction to Scratch: Features, Interface, Blocks






Introduction to Scratch

·       Scratch is a visual programming language that allows us to easily create and share interactive stories, games, and animations by snapping code blocks together.

·       Scratch is one of the most popular and widely used block programming languages.

·       It was developed by Lifelong Kindergarten Group at MIT Media Lab, and is an open-source platform, which means that the software is free and publicly available to everyone.

·       It has a large and supportive community of users, who share their projects and help each other on the Scratch website.

·       Scratch has different verisons such as scratch 1.0, scratch 2.0 and Scratch 3.0 which is the current version , introduced in 2019.

·       Scratch can be used offline or online.

·       Scratch a real software development tool with a colorful interface and presentation style.

·       With Scratch, you can also make your dream projects such as games and even controlling robots or devices a reality.

 

Features of Scratch

·       Block-based coding - Use colorful blocks that snap together to build programs, making it easy to understand coding logic without typing code.

·       Sprites & Backdrops - Create and animate characters (sprites) and design scenes (backdrops) for your stories or games.

·       Community Sharing - Share projects online, explore others’ projects, remix them, and get feedback.

·       Motion & Animation - Make sprites move, turn, glide, bounce, and animate them with costumes.

·       Variables & Lists - Store and use data to keep scores, timers, or any custom values.

 

 

Scratch Interface

·       Stage – The Stage is the main area in Scratch where the actions of the script are displayed; it shows the output of the program.

·       Sprite - A sprite in Scratch is the character or object that we program to act, move, or interact on the Stage.

·       Script Area - The Script Area is the workspace where we drag, drop, and connect code blocks to write scripts that control the behavior of sprites and the stage.

·       Blocks palette: The Block Palette is the area in Scratch that contains different categories of blocks like Motion, Looks, Sound, Events, Control, Sensing, Operators, Variables, and My Blocks, which we can drag and drop into the Script Area to build the code.

·       Sprite List - Shows all the sprites (characters or objects) used in the project.

 

Concept of Block

·       Block programming uses colorful blocks to show actions or commands.

·       We put them together by dragging and dropping to make a list of things to do.

·       It’s like playing with building blocks, but we’re building programs! This way of coding is easy for beginners, like you, to understand.

·       For example, to move a character or make it perform an action like jump, simply we can select and connect the corresponding blocks. It helps to be creative and figure out problem solving skills.

 

Category

Color

Purpose

Motion

🔵 Blue

Controls the movement of sprites (move, turn, go to, glide).

Looks

🟣 Purple

Changes how sprites look or appear (say, think, change costume, show, hide).

Sound

🔴 Pink

Adds or controls sounds and music (play sound, stop sound, change volume).

Events

🟡 Yellow

Detects events or triggers (when flag clicked, when sprite clicked, broadcast).

Control

🟠 Orange

Manages flow of the program (repeat, if-then, forever, wait).

Sensing

🔵 Light Blue

Detects conditions and inputs (touching, key pressed, mouse position).

Operators

🟢 Green

Performs math, logic, and string operations (add, subtract, join text, comparisons).

Variables

🟧 Dark Orange

Allows you to store and change values (create variables, set, change).

My Blocks

🔴 Red

Lets you create custom blocks for reusable code or to simplify complex scripts.

 

 

 

Friday, July 4, 2025

Introduction to Block Programming - Explained for Beginner - Grade 9 Computer Science 2082 [Revised]


3. Block Programming





3.1 Concept of Block Programming

 

·       Block programming is a popular programming language made for beginners, especially children, to teach them the basics of programming by using colorful blocks to create computer programs, animations, stories and games.

·       It supports the use of graphics, animations, and sounds without the need to understand complex programming languages.

·       Some examples of block programming platforms are Scratch, Blockly, and Snap.

 

Purpose of Block Programming

 

·       The main purpose of block programming is to make learning and creating computer programs easier and more fun, especially for beginners and young learners.

·       Instead of writing complex lines of code, users can drag and drop colorful blocks that fit together like puzzle pieces to build programs.

·       Each block represents a specific command, function, or operation, which can be snapped together like puzzle pieces to form a complete program

 

Advantages of block programming

 

·       The users do not need to worry about syntax or grammar like other programming languages.

·       The users have more time to focus on creativity, logical thinking, and problem-solving skills.

·       The chances of human typing error are less since the users do not need to write codes.

·       The colorful and visual nature of block programming makes it fun, engaging, and easier to understand for beginners.

 

Applications of block programming

 

Educational purpose

·       Block programming is widely used in schools to introduce programming concepts to children and beginners in a simple and engaging way.

 

Game development

·       Block programming is used to create games by designing characters, animations, and game logic, allowing users to focus on gameplay without worrying about complex coding.

 

Robotics & IoT

·       Block programming is used to program robots by visually controlling their movements, behaviors, and sensors, including devices like micro:bit and Arduino UNO.

 

Animation & Storytelling

·       Block programming is used to create animated stories, cartoons, and interactive media without needing to write code.

 

App Development

  • Block programming is used to build apps for Android and iOS easily using blocks instead of text code.

 


Saturday, May 24, 2025