Looking for In24-S1-CS1033 - Programming Fundamentals test answers and solutions? Browse our comprehensive collection of verified answers for In24-S1-CS1033 - Programming Fundamentals at online.uom.lk.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
What will be the output of the following Python code segment?
d = "M"def add( arg2 , arg1 = "U" ): global d d += arg2 + arg1 returnadd("o")print (d)
What will be the output of the following Python code segment?
def myFunc( x ): x += 30 return xx = 20myFunc(x)print (x)
Consider the following Python function.
def PerformTask(S): L = []; for i in range(0, len(S)): if S[i] == "(": L.append(S[i]) elif S[i] == ")" and len(L)>0: L.pop() else: return False return True
Which of the following input parameter will result in a return value of “True" in the above?
What will be the output of the following Python code segment?
def makeWord( c1 = "m", *c2 ): c = c1 for a in c2: c += a return cprint (makeWord("k","i","n","d"))
What will be the output of the following Python code segment?
def printname( fn = "L", sn = "D", ln = "Shanaka" ): ln = "Mathews" print(fn,sn,ln) returnprintname("A")