logo

Crowdly

Browser

Add to Chrome

What does the following program print to the terminal when executed? Wat dr...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What does the following program print to the terminal when executed?

Wat druk die volgende program na die terminaal as dit uitgevoer word?

import stdio

import stdarray

def findValue(M,x):

    j = 0

    i = 0

    while (i < len(M)):

        while (j < len(M[0])):

            if M[i][j] == x:

                return True

            i += 1

            j += 1

    return False

def main():

    M = stdarray.create2D(400,3,0)

    M[300][2] = 5

    stdio.writeln(findValue(M,5))

if __name__ == "__main__": main()

More questions like this

Want instant access to all verified answers on stemlearn.sun.ac.za?

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

Browser

Add to Chrome