Font size
WorksheetsSHS VB.Net
Total questions: 12
Worksheet time: 36mins
Question: Identify the errors in this code. Why will it not run correctly?
Explain it and Rewrite the code
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
Question: The program runs, but the output label is misleading. What is wrong?
Explain or Rewrite the correct code
Question: The program runs, but why is the result not exact?
Question: The student expected the result to be (5 + 10) * 2 = 30, but the program outputs 25. Why?
Rewrite the whole code
❌ 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.
Instruction: The program is supposed to assign 50 to score, but it has a syntax error. Fix the assignment.
Instruction: The program tries to use total without declaring it. Add proper declaration.
Instruction: The program assigns "100" to an Integer. Correct the data type mismatch.
Instruction: The program should compute an employee’s total salary, but has wrong assignments, missing &, and misplaced strings. Debug it.
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.
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.
