Question 1 The process of hiding a complex process by developing a…

QuestionAnswered step-by-stepQuestion 1 The process of hiding a complex process by developing a…Question 1The process of hiding a complex process by developing a mechanism to simplify or hide that process is known by what term?  a. obfuscation  b. abstraction  c. simplification  d. diffraction 3 points  Question 2What statement must be at the top of your program if you want to use the sqrt() function?  a. import io  b. import math  c. import util  d. import sqrt 3 points  Question 3Where can the required arguments for a function be found?  a. In the function keyword list.  b. In the module docstring.  c. In the function’s return list.  d. In the function header. 3 points  Question 4The main function usually expects no arguments and returns no value. True False 3.5 points  Question 5What is the return value for a function that has no return statement defined?  a. The function will return a NULL value.  b. The function will return a value of True, provided there are no errors.  c. The function will return a special value of None.  d. The function will return a value of False. 3.5 points  Question 6Functions that do not return a value are called ____ functions.  a. null  b. zero  c. empty  d. void 3.5 points  Question 7If a function has no parameters, it does not need to have ( ) at the end of the function header. True False 3.5 points  Question 8Once you write and properly debug a function, you can use it in the program again and again without having to rewrite the same code repeatedly. True False 3.5 points  Question 9The execution of a return statement in a user-defined function ends the whole program. True False 3.5 points  Question 10What is the final value of x?import mathx = math.ceil(5.2) 3.5 points  Question 11What is the final value of v?import mathv = math.floor(26.9995) 3.5 points  Question 12Using functions greatly enhances a program’s readability because it reduces the complexity of the function main. True False 3.5 points  Question 13A value return function can return multiple values. True False 3.5 points  Question 14If an int parameter is changed inside the function, then it will __________ back in the calling function.  a. none of these  b. not be changed  c. be set to zero  d. be changed 3.5 points  Question 15What type of variable is x?def doStuff():    x = 20    y = 30    return x * y print(“Let’s run a function”)z = doStuff()print(z)  a. custom  b. local  c. global  d. general 3.5 points  Question 16  What is j?def calculate(j):    k = 2    m = j ** k    return m a = int(input(“Please enter a number: “))b = calculate(a)print(b)  a. global variable  b. local variable  c. parameter  d. b & c  e. all of the above 3.5 points  Question 17def mystery(num1, num2):    if num1 > 0:        num2 = num2 * 2        return num2    else:        num1 = num1 + 2        return num1Given the above function, what is the output of the following statement in the main function?print(mystery(-3,4)) 3.5 points  Question 18def mystery(num1, num2):    if num1 > 0:        num2 = num2 * 2        return num2    else:        num1 = num1 + 2        return num1Given the above function, what is the output of the following statement in the main function?print(mystery(4,-5)) 3.5 points  Question 19Given the function below, which of the following statements would run without error?def compute(x, y, z):    a = x * 2    b = y + z    c = a / b    return b  a. print(compute(5,3))  b. print(compute())  c. print(compute(5,3,10))  d. print(compute(5,3,’h’)) 3.5 points  Question 20Given the following code, which methods can use the variable x? def main():       x = 3       y = 2       z = calcData(x, y)       w = doStuff(x, y)       print(z, ” “, w)def calcData(a, b):       c = a ** b       return cdef doStuff(j, k):       m = 25 % j + k;       return m;# The entry point for program executionif __name__ == “__main__”: main()  a. main  b. doStuff  c. all of them  d. calcData 3.5 points  Question 21Given the following code, which methods can use the variable a?  def main():       x = 3       y = 2       z = calcData(x, y)       w = doStuff(x, y)       print(z, ” “, w)def calcData(a, b):       c = a ** b       return cdef doStuff(j, k):       m = 25 % j + k;       return m;# The entry point for program executionif __name__ == “__main__”: main()  a. all of them  b. calcData  c. main  d. doStuff 3.5 points  Question 22Given the following code, which methods can use the variable __name__?  def main():       x = 3       y = 2       z = calcData(x, y)       w = doStuff(x, y)       print(z, ” “, w)def calcData(a, b):       c = a ** b       return cdef doStuff(j, k):       m = 25 % j + k;       return m;# The entry point for program executionif __name__ == “__main__”: main()  a. all of them  b. calcData  c. main  d. doStuff 3.5 points  Question 23If a reference parameter is changed inside its function then its value will not be changed in the calling function. True False 3.5 points  Question 24What is output by the following code?def main():       x = 3       y = 2       z = calcData(x, y)       w = doStuff(x, y)       print(z + w)def calcData(a, b):       c = a ** b       return cdef doStuff(j, k):       m = 25 % j + k;       return m;# The entry point for program executionif __name__ == “__main__”: main() 3.5 points  Question 25What is the output of the following code?def main():    x = 7    y = 5    z = 6    compute(x, y, z)    print(x+y+z)    def compute(x, y, z):       y = 1       x = y + z       z = x * y    # The entry point for program executionif __name__ == “__main__”: main() 3.5 points  Question 26What is the output of the following code?def main():    nbrlist = [2, 4, 6, 8, 10]    processList(nbrlist)    print(nbrlist[2])    def processList(list):       for i in range(len(list)):           list[i] = list[i] / 2    # The entry point for program executionif __name__ == “__main__”:     main() 3.5 points  Question 27What is the output?def main():    nbrlist = [10, 20, 30]    x = 0.5    processList(nbrlist, x)    print(x * nbrlist[0])    def processList(list, a):       a = 2.0       for i in range(len(list)):           list[i] = list[i] * 10    # The entry point for program executionif __name__ == “__main__”: main()Computer ScienceEngineering & TechnologyPython ProgrammingITSE 1429Share Question