[go: up one dir, main page]

0% found this document useful (0 votes)
47 views3 pages

VB Test 8 TH

This document is an assessment for Class 8 students at The City School, DHA Campus, consisting of True/False questions, fill-in-the-blank questions, and scenario-based questions related to Visual Basic programming. It tests students' understanding of key concepts such as properties, variables, loops, and error handling in Visual Basic. The assessment is designed to evaluate both theoretical knowledge and practical application of programming skills.

Uploaded by

Mahboob Riaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
47 views3 pages

VB Test 8 TH

This document is an assessment for Class 8 students at The City School, DHA Campus, consisting of True/False questions, fill-in-the-blank questions, and scenario-based questions related to Visual Basic programming. It tests students' understanding of key concepts such as properties, variables, loops, and error handling in Visual Basic. The assessment is designed to evaluate both theoretical knowledge and practical application of programming skills.

Uploaded by

Mahboob Riaz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

The City School

DHA Campus

Class 8

Name and Section ………………………………………… 15 Marks

True/False (5 Marks)

(Write "True" or "False" for each statement.)

1. Visual Studio is only used for developing web applications.

2. The Text property of a button defines the text displayed on it.

3. A variable in Visual Basic can store different types of data, such as numbers and text.

4. The If…Then statement allows a program to make decisions based on conditions.

5. The For…Next loop runs an unlimited number of times until a condition is met.

Section 2: Fill in the Blanks (5 Marks)

(Fill in the blanks with the correct words.)

6. The ______ property of a control determines whether it is enabled or disabled.

7. A ______ is a block of code that performs a task and returns a value in Visual Basic.

8. In a Visual Basic program, ______ allows repeating a set of instructions multiple

times.

9. A ______ stores True/False values in Visual Basic.

10. In Visual Studio, ______ is pressed to run the program in debug mode.
Section 3: Scenario-Based Questions (5 Marks)

(Write short answers for each scenario.)

11. You want to display the message "Welcome to VB!" when a button is clicked. What
code will you write inside the button click event?

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

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

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

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

12. A user enters two numbers in a form, and you need to add them and show the result.
What variables and data types should you use?

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

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

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

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

13. Your program crashes when a user enters text instead of a number in a numeric input
field. What error-handling technique can you use?

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

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

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

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

14. You need to create a loop that adds numbers from 1 to 100. Which type of loop will
you use and why?

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

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

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

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

15. You want a button to change color when the mouse pointer hovers over it. Which
mouse event will you use?

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

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

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

You might also like