<jupyter_start><jupyter_text>1. Is the highlighted assignment to f in the following code a legal variable assignment?<jupyter_code>var f func(string) int

func test(x string) int{
    return len(x)
}

func main(){
    f = test
}<jupyter_output><empty_output><jupyter_text>Ans: Yes  2. Which of the following statements correctly declares a function whose argument is another function which takes an integer as an argument and returns a string?  Ans: func fA(fB func (int) string)   3. What is an anonymous function?  Ans: A function with no name  4. Which of the following statements correctly declares a function whose return value is another function which takes a string as an argument and returns an integer?  Ans: func fA(fB func (int) string) {}  5. What does the below code print on the screen?<jupyter_code>func fA() func() int{
    i := 0
    return func() int{
        i++
        return i
    }
}
func main(){
   fB := fA()
   fmt.Print(fB())
   fmt.Print(fB())
}<jupyter_output><empty_output><jupyter_text>Ans: 12  6. What symbols are used in a function declaration to indicate that it is a variadic function?  Ans: ”...”  7. What does this routine produce?<jupyter_code>package main

import "fmt"

func main(){
	i := 1
	fmt.Print(i)

	i++
	defer fmt.Print(i+1)

	fmt.Print(i)
}<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09545454545454546, 'fraction_numerical': 0.00909090909090909, 'mean_word_length': 4.003787878787879, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '272655', 'license': 'MIT', 'n_tokens_mistral': 438, 'n_tokens_neox': 425, 'n_words': 173, 'path': 'Coursera/Functions, Methods, and Interfaces in Go/Week-2/Quiz/Module-2-Quiz.ipynb', 'repo_name': 'manipiradi/Online-Courses-Learning', 'size': '1320'}