logo

Crowdly

Browser

Add to Chrome

In24-S1-CS1033 - Programming Fundamentals

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

    return

add("o")

print (d)
View this question

What will be the output of the following Python code segment?

def myFunc( x ):

        x += 30

        return x

x = 20

myFunc(x)

print (x)

View this question

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?

0%
0%
100%
View this question

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 c

print (makeWord("k","i","n","d"))
View this question

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)

    return

printname("A")
View this question

Want instant access to all verified answers on online.uom.lk?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!

Browser

Add to Chrome