topic/Tricky Questions
Start Test
Question No
Title
Type
Marks
517.
What is the output of the following Python code?def mystery_function(x): return x if x > 0 else mystery_function(-x) result = mystery_function(-5) print(result)
MCQ
5
518.
What is the value ofresultafter executing the following Python code?my_list = [1, 2, 3, 4, 5] result = my_list[::2]
MCQ
5
520.
What is the correct way to check if a key is present in a dictionary?my_dict = {'name': 'John', 'age': 25} key_to_check = 'age'
MCQ
5
519.
What will be the output of the following Python code?x = 5 y = 2 result = x // y
MCQ
5
521.
What will be the output of the following Python code?x =[1, 2, 3]y = x y[0] = 10 print(x)
MCQ
5