🔍
What will be the output? numberGames = {}  numberGames[(1,2,4)] = 8 numberGames[(4,2,1)] = 10 numberGames[(1,2)] = 12 sum = 0  for k in numberGames:   sum += numberGames[k] print len(numberGames) + sum Page No 36  a) 30  b) 24  c) 33  d) 12
0 like 0 dislike

1 Answer

a) 30
0 like 0 dislike

Related questions

hat is the output of the following? i = 5 while True: if i%0O11 == 0: Page No 12 break print(i) i += 1 a) 5 6 7 8 9 10 b) 5 6 7 8 c) 5 6 d) error
Answer : b) 5 6 7 8...

View solution
0 like 0 dislike
1 answer

What is the output of the following? x = 'abcd' for i in range(len(x)): x = 'a' print(x) Page No 17 a) a b) abcd abcd abcd c) a a a a d) none of the mentioned
Answer : c) a a a a...

View solution
0 like 0 dislike
1 answer

What is the output when following code is executed ? names1 = ['Amir', 'Bear', 'Charlton', 'Daman'] names2 = names1 names3 = names1[:] names2[0] = 'Alice' names3[1] = 'Bob' sum = 0 for ls in (names1, names2, names3): ... if ls[1] == 'Bob': sum += 10 print sum a) 11 b) 12 c) 21 d) 22
Answer : d) 22...

View solution
0 like 0 dislike
1 answer

What will be the output? >>>t = (1, 2, 4, 3, 8, 9) >>>[t[i] for i in range(0, len(t), 2)] a) [2, 3, 9]. b) [1, 2, 4, 3, 8, 9]. c) [1, 4, 8]. d) (1, 4, 8)
Answer : c) [1, 4, 8]....

View solution
0 like 0 dislike
1 answer

What is the output of the following? d = {0: 'a', 1: 'b', 2: 'c'} for i in d: print(i) Page No 18 a) 0 1 2 b) a b c c) 0 a 1 b 2 c d) none of the mentioned
Answer : a) 0 1 2...

View solution
0 like 0 dislike
1 answer

50.5k questions

47.1k answers

240 comments

7.0k users