wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

SHS VB.Net

Total questions: 12

Worksheet time: 36mins

Name
Class
Date
1.

Question: Identify the errors in this code. Why will it not run correctly?
Explain it and Rewrite the code

4 lines
2.

Question: The program accepts input but does not compute correctly. What is wrong?

Rewrite the code with error -> in this part its within the Else

4 lines
3.

Question: The program runs, but the output label is misleading. What is wrong?

Explain or Rewrite the correct code

4 lines
4.

Question: The program runs, but why is the result not exact?

4 lines
5.

Question: The student expected the result to be (5 + 10) * 2 = 30, but the program outputs 25. Why?

Rewrite the whole code

4 lines
6.

Problem:
num1 and num2 are declared as String. VB tries to add strings instead of integers → wrong result or error.

Rewrite the code to make it work.

4 lines
7.

Instruction: The program is supposed to assign 50 to score, but it has a syntax error. Fix the assignment.

4 lines
8.

Instruction: The program tries to use total without declaring it. Add proper declaration.

4 lines
9.

Instruction: The program assigns "100" to an Integer. Correct the data type mismatch.

4 lines
10.

Instruction: The program should compute an employee’s total salary, but has wrong assignments, missing &, and misplaced strings. Debug it.

4 lines
11.

Instruction: The program should display a student’s name, age, and average grade, but contains several errors (undeclared variable, wrong operators, strings vs numbers). Fix it.

4 lines
12.

Instruction:
The program should compute the average of 4 subject grades entered by the user and show if the student passed (≥75) or failed. Fix the errors.

4 lines