logo

Crowdly

Browser

Додати до Chrome

Computer Science / Rekenaarwetenskap - 144

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

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

Which statements about recursion (§2.3) are true? Select all that apply. Wrong choices reduce your mark (not below 0).

Watter stellings oor rekursie is waar? Kies al die korrekte opsies. Verkeerde keuses verminder jou punt (nie onder 0 nie).

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

Which statements describe the symbol-table API design in §4.4 (also followed by Python's dict)? Select all that apply. Wrong choices reduce your mark (not below 0).

Watter stellings beskryf die ontwerp van die simbooltabel-API in §4.4? Kies al die korrekte opsies. Verkeerde keuses verminder jou punt (nie onder 0 nie).

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

What does this code write (§3.2)?

class Account:

def __init__(self, owner, balance):

self._owner = owner

self._balance = balance

def deposit(self, amount):

self._balance += amount

def balance(self):

return self._balance

accounts = [Account('ann', 10), Account('bob', 20)]

first = accounts[0]

accounts[0] = Account('cat', 30)

first.deposit(5)

accounts[1].deposit(5)

print(first.balance(), accounts[0].balance(), accounts[1].balance())

Wat skryf hierdie kode?

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

Which statements about designing data types (§3.3) are true? Select all that apply. Wrong choices reduce your mark (not below 0).

Watter stellings oor die ontwerp van datatipes is waar? Kies al die korrekte opsies. Verkeerde keuses verminder jou punt (nie onder 0 nie).

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

A graph has these edges:

P-Q  Q-R  R-S  S-P  R-T  T-U

What is its average path length, as computed by averagePathLength() in smallworld.py (§4.5): the sum of the shortest-path distances over all ordered pairs of different vertices, divided by V(V − 1)? Give 3 decimal places, using a decimal point (e.g. 0.123).

'n Grafiek het die kante hierbo. Wat is sy gemiddelde padlengte, soos bereken deur averagePathLength(): die som van die kortste-pad-afstande oor alle geordende pare verskillende punte, gedeel deur V(V − 1)? Gee 3 desimale plekke en gebruik 'n desimale punt (bv. 0.123).

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

With questions.py (§4.2) and k = 7, the program asks "Greater than or equal to mid?" questions to find a hidden number between 0 and 127. The first question is "Greater than or equal to 64?". The hidden number is 45. Which list gives the replies, in order?

Met questions.py en k = 7 vra die program "Groter as of gelyk aan mid?"-vrae om 'n versteekte getal tussen 0 en 127 te vind. Die versteekte getal is 45. Watter lys gee die antwoorde, in volgorde?

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

Which statements about percolation (§2.4) are true? Select all that apply. Wrong choices reduce your mark (not below 0).

Watter stellings oor perkolasie is waar? Kies al die korrekte opsies. Verkeerde keuses verminder jou punt (nie onder 0 nie).

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

Let a = [10, 20, 30, 40, 50]. Match each expression with its value (§1.4).

Gestel a = [10, 20, 30, 40, 50]. Pas elke uitdrukking by sy waarde.

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

What does this program write (§1.3)?

count = 0

for i in range(1, 6):

for j in range(i, 6):

if (i + j) % 3 == 0:

continue

if j == 4:

break

count += 1

print(count)

Wat skryf hierdie program? Gee 'n heelgetal.

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

Evaluate this postfix (reverse Polish) expression with a single stack, as described in §4.3:

5 1 2 + 4 * + 3 -

Evalueer hierdie postfix-uitdrukking (omgekeerde Poolse notasie) met een stapel. Gee 'n getal.

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

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

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

Browser

Додати до Chrome