KS3 Parson Puzzle 7 VB.net – subroutines

Code / algorithm aim

The code should declare the ‘main’ sub routine. In the main subroutine a call should be made to a subroutine called ‘question1’. The question1 subroutine should be declared and the user asked what the capital of France is. The code should check that the answer is Paris, if it is the code should tell the user they are correct and call the question 2 subroutine.

If the user does not enter Paris as their answer, the user should be told that they are incorrect and should try again. The first question subroutine should be called again to start the question again.

The ‘question2’ subroutine should be declared. The subroutine should ask the user what the capital city of Germany is. The program should check that the user enters Berlin and if they do, should tell the user they have the right answer.

If the user does not enter Berlin the user should be told that they are incorrect and should try again. The ‘question2’ subroutine should be called again to start the question again.

Instructions

All the code that you need has been given below. Simply organise the code blocks into the correct order so that the code follows the algorithm aim above.

You can organise the blocks by clicking on the arrows on the right hand side to place them above or below the other blocks.

Imports System

Module Program

End Module