Erlynmaysaldivia11viz Erlynmaysaldivia11viz Computer Science Answered MODULE 8 - Kotlin functionPre – test:What is functions? What are the different types of functions?Assessment1. Write the output of these two programs:A.1. fun main(args: Array<String>){2. sum()3. print("code after sum")4. }5. fun sum(){6. var num1 =57. var num2 = 68. println("sum = "+(num1+num2))9. }Output:B.1. fun main(args: Array<String>){2. val result = sum(5, 6)3. print(result)4. }5. fun sum(number1: Int, number2:Int): Int{6. val add = number1+number27. return add8. }Output:Create a simple function which will take an integer as input and returns the square of it.