logo

Crowdly

Browser

Add to Chrome

Programmierung (BTW2102) 25/26

Looking for Programmierung (BTW2102) 25/26 test answers and solutions? Browse our comprehensive collection of verified answers for Programmierung (BTW2102) 25/26 at moodle.bfh.ch.

Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!

What will the following code output?

for char in 'hello':

   if char == 'l':

       break

   print(char, end=' ')

0%
50%
0%
50%
View this question

Was ist der Zweck der range-Funktion in einer for-Schleife?

What is the purpose of the  range function in a for loop?

0%
50%
50%
0%
View this question

Was wird der folgende Code ausgeben?

Find the output of the following program:

a = [1, 2, 3, 4]

b = a

c = a.copy()

d = a

a[0] = [5]

print(a, b, c, d)

0%
100%
0%
0%
View this question

Zweck des Modus rb beim Öffnen einer Datei?

What is the purpose of  rb mode in file opening?

100%
0%
0%
0%
View this question

Welche der folgenden ist die korrekte Syntax, um eine Ausnahme abzufangen und ihre Details in einer Variablen zu speichern?

Which of the following is the correct syntax to catch an exception and store its details in a variable?

100%
0%
0%
0%
View this question

Der Zweck des finally-Blocks in der Ausnahmebehandlung (Exception Handling) in Python ist:

What is the purpose of the finally block in exception handling?

0%
0%
100%
0%
View this question

Was ist das Resultat dieses Codes ?

What is correct as a result for from this code?

d = {1:'A', 2:'B', 3:'C'} 

del d[1] 

d[1] = 'D'

del d[2] 

print(len(d))

50%
0%
0%
50%
View this question

Finde den Output von folgendem Programm:

Find the output of the following program:

a = {} 

a[1] = 1

a['1'] = 2

a[1]= a[1]+1

count = 0

for i in a: 

    count += a[i] 

print(count)

0%
100%
0%
0%
View this question

Was wird der folgende Code ausgeben?

What will the following code output?

for i in range(3):

   print(i, end =' ')

 

0%
50%
50%
0%
View this question

Was wird der folgende Code ausgeben?

What will the following code output?

numbers = [1, 2, 3, 4, 5]

for i in range(len(numbers)):

    num = numbers[i]

    if i % 2 == 0:

        continue

    print(num, end=' ')

0%
0%
0%
0%
View this question

Want instant access to all verified answers on moodle.bfh.ch?

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

Browser

Add to Chrome