Sorry I'm unfamiliar with Python, but if you've the function already...
and
Then write something like:
Pseudo code:
Code:
Integer Function hailEven(Integer x)
return x/2
End Function hailEven
Integer Function hailOdd(Integer x)
return 3x+1
End Function hailOdd
Main method
Integer Command
Do
Show.Output("Enter integer (-1 to exit): ")
Command = Get.InputStream
If Command % 2 = 0 // This is even
hailEven(Command)
Else // Odd
hailOdd(Command)
End If
While (Command is not -1)
End Main I hope that helps
