View Mode
Q: 11
What is the expected output of the following code? x = [[[1, 2], [3, 4]], [[5, 6], [7, 8]]] def func(data): res = data[0][0] for da in data: for d in da: if res < d: res = d return res print(func(x[0]))
Options
Q: 12
What is the result of the following code snippet? val1 = 10 val2 = 20 val3 = val1 > val2 or val2 % val1 == 0 print(val3)
Options
Q: 13
What will be the output of the following Python code? d = {0, 1, 2} for x in d: print(x)
Options
Q: 14
You have the following code: user_input = input("Enter a number: ") result = user_input ** 2.0 print(f'{user_input} to the power of 2 is {result}') User enters 10. The result of the input() function is a string. How can you modify this code to get rid of the TypeError exception and get the result 100.0? (select 2)
Options
Q: 15
What is the expected output of the following code? def fun(): return True x = fun(False) print(x)
Options
Q: 16
What is the output of the following Python code? x = "Hello, World!" result = x.split(",") print(result)
Options
Q: 17

Please fill the blank field(s) in the statement with the right words. Program code making use of a given module is called a ________ of the module.

Your Answer
Q: 18
What is the expected output of the following code? def func(message, num=1): print(message * num) func('Hello') func('Welcome', 3)
Options
Q: 19
What is the result of the following code snippet? def compute(i, j): return i ** 2 + j ** 2 print(compute(j=2, 2))
Options
Q: 20
Who is the creator of Python?
Options
Question 11 of 20 · Page 2 / 2

Premium Access Includes

  • Quiz Simulator
  • Exam Mode
  • Progress Tracking
  • Question Saving
  • Flash Cards
  • Drag & Drops
  • 3 Months Access
  • PDF Downloads
Get Premium Access
Scroll to Top

FLASH OFFER

Days
Hours
Minutes
Seconds

avail 10% DISCOUNT on YOUR PURCHASE