I am including attachments of screen shots of both the question and the corresponding answers.
What I don't get is why the Return Value is 'ETYB' and not 'YTEB'.
I'd also love if someone could fix my code so that it produces the same answer as in the marks scheme (screen shot).
Here is the code:
Public Class Form1
Function Y(ByVal s As String) As String
Dim x As Integer = s.Length
If x = 1 Then
Return Y(Microsoft.VisualBasic.Right(s, x - 1) + Microsoft.VisualBasic.Left(s, 1))
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim text As String = "BYTE"
Dim answer As String
answer = Y(text)