logo

Crowdly

Browser

Додати до Chrome

Rekenaarwetenskap - Computer science - 113/114

Шукаєте відповіді та рішення тестів для Rekenaarwetenskap - Computer science - 113/114? Перегляньте нашу велику колекцію перевірених відповідей для Rekenaarwetenskap - Computer science - 113/114 в stemlearn.sun.ac.za.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

Download the plagiarism form, read it, and sign it.

Upload the signed plagiarism form as pdf.

Plagiarism Declaration Form: LINK

Переглянути це питання

What does the Python3 program below compute?

Wat bereken die Python3 program hieronder?

#--------------------------------

#newton.py

import stdio

import sys

def main():

    c = float(sys.argv[1])

    t = c

    EPSILON = 1e-15

    while (abs(t - c*t**(-4)) > EPSILON*t):

        t = 0.8*t + 0.2*c*t**(-4)

    stdio.writeln(t)

if __name__ == "__main__": main()

#--------------------------------

 
Переглянути це питання

What is printed to the screen if the following command is executed?

Wat word na die skerm gedruk as die volgende bevel uitgevoer word?

python3 isleapyear.py 1852

#--------------------------------

#isleapyear.py

import stdio

import sys

def main():

year_in = int(sys.argv[1])

year = 0

while(year_in>0):

year *= 10

year += year_in%10

year_in //= 10

isLeapYear = (year % 4 == 0)

isLeapYear = isLeapYear and ((year % 100) != 0)

isLeapYear = isLeapYear or ((year % 400) == 0)

    stdio.writeln(isLeapYear)

if __name__ == "__main__": main()

#--------------------------------

Переглянути це питання

Choose form the given options below the option which gives the correct binary representation of the decimal number 942.

Kies die opsie hieronder wat die korrekte binêre voorstelling van die desimale getal 942 weergee.

Переглянути це питання

What is printed to the screen if the following Python3 program is executed?

Wat word na die skerm gedruk as die volgende Python3 program uitgevoer word?

#--------------------------------

#ruler.py

import stdio

def main():

  x = 1234

  ruler = ""

  for k in range(4):

    digit = str(x%10)

    x //= 10

    ruler = ruler + digit + ruler

  stdio.writeln(ruler)

if __name__ == "__main__": main()

#--------------------------------

 
Переглянути це питання

What does the following Python program print to the screen when executed?

Wat druk die volgende Python program na die skerm wanneer dit uitgevoer word?

#--------------------------------

#precedence.py

import stdio

def main():

   X = 2

   Y = 1

    

    X = X**Y**X + 5*Y

    Y = (5*Y % 4) // 2

    stdio.writeln(str(X)+" "+str(Y))

if __name__ == "__main__": main()

#--------------------------------
Переглянути це питання

Who is regarded as being the first programmer?

Wie word beskou as die eerste programmeerder?

Переглянути це питання

What does the following Python program print to the screen when executed?

Wat druk die volgende Python program na die skerm wanneer dit uitgevoer word?

#--------------------------------

#boole1.py

import sys

import stdio

def main():

   x = False

    y = True

   x = (x and y) or not(x or y and x) and y or not y

   y = (x and y) or (x or y); y = not (x and y) and (x or y)

    stdio.write(str(x))

    stdio.write(" "+str(y))

    stdio.writeln(" "+str(x ^ y))

if __name__ == "__main__": main()

#--------------------------------
Переглянути це питання

Simplify:

Vereenvoudig:

not ((not (a and b or c) and (a or b and c)) or ((a and b or c) or not (a or b and c))) 

Переглянути це питання

What is the value of j after each of the following code fragments is executed?

Wat is die waarde van j nadat elkeen van die volgende kode fragmente uitgevoer is?

Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на stemlearn.sun.ac.za?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!

Browser

Додати до Chrome