Login
Register
Dark Mode
Brightness
Ambient Glow – Questions list
Register
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged python-programming
4
4 votes
1
1 answer
293
293 views
Question on for loop
What is the output of the below code snippet?for var1, var2 in (1,2),(3,4): print(var1 + var2, end = " ")(a) 4 6(b) 10(c) 3 7(d) TypeError
sri321
293
views
asked
Aug 26
Programming in Python
python
programming-in-python
python-programming
for-loop
+
–
1
1 vote
1
1 answer
296
296 views
Question on Nested Loops and List Indexing in Python
What is the output of the below code snippet?result = 0 list1 = [10,20,30] list2 = [1,2] for num in range(len(list1)): for num in range(len(list2)): result += list1[num] ...
sri321
296
views
asked
Aug 26
Programming in Python
python-programming
python
programming-in-python
list
for-loop
+
–
0
0 votes
1
1 answer
257
257 views
Question on Call by object reference
What is the output of the below code snippet?def move(list1, list2): for num in list1: list2.append(num) list1.remove(num) list1 = [1,2,3,4,5] list2 = [10] move(list1, li...
sri321
257
views
asked
Aug 26
Programming in Python
python-programming
python
programming-in-python
list
functions
+
–
3
3 votes
3
3 answers
442
442 views
Python Interning concept
What will be output in Line-1 and Line-2 in the following code?a = 256 b = 256 print(a is b) #Line-1 c = 257 d = 257 print(c is d) #Line-2
sri321
442
views
asked
Mar 17
Programming in Python
python-programming
python
+
–
1
1 vote
1
1 answer
344
344 views
GATE DA 2026 | Python & DS | Memory Based | Question 46
Consider the following Python code:def append_to_lst(val, lst=[]): lst.append(val) return lst print(append_to_lst(1)) print(append_to_lst(2)) print(append_to_lst(...
GO Classes
344
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
one-mark
+
–
1
1 vote
0
0 answers
259
259 views
GATE DA 2026 | Python & DS | Memory Based | Question 45
Let $G=(V,E)$ be a directed graph, and let $G^R$ denote the graph obtained by reversing all the edges of $G$.Which of the following statements is/are TRUE?If a vertex $v$...
GO Classes
259
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
algorithms
two-marks
+
–
0
0 votes
2
2 answers
344
344 views
GATE DA 2026 | Python & DS | Memory Based | Question 41
A binary tree has the following traversals:Preorder traversal$: P, Q, S, E, R, F, G$ Inorder traversal$: S, Q, E, P, F, R, G$ Which of the following statement(s) is/are T...
GO Classes
344
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
data-structures
algorithms
python-programming
multiple-selects
one-mark
+
–
0
0 votes
1
1 answer
256
256 views
GATE DA 2026 | Python & DS | Memory Based | Question 40
Consider the following Python code:def outer(): x = [] def inner(val): x.append(val) return x return innerNow consider:f1 = outer() f2 = outer...
GO Classes
256
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
multiple-selects
two-marks
+
–
1
1 vote
2
2 answers
368
368 views
GATE DA 2026 | Python & DS | Memory Based | Question 39
Consider the following function:def fun(L, i = 0): if i >= len(L) - 1: return 0 if L[i] L[i + 1]: L[i], L[i + 1] = L[i + 1], L[i] return ...
GO Classes
368
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
numerical-answers
two-marks
+
–
1
1 vote
3
3 answers
335
335 views
GATE DA 2026 | Python & DS | Memory Based | Question 38
Consider the following function:def mystery(n): if n <= 0: return 1 else: return mystery(n - 1) + mystery(n - 2)If the function is called as $\tex...
GO Classes
335
views
asked
Feb 17
Programming in Python
goclasses
gate2026_da_memorybased
python-&-dsa
python-programming
two-marks
+
–
7
7 votes
3
3 answers
3.9k
3.9k views
GATE DA 2025 | Question: 13
Consider the following Python declarations of two lists.\[\begin{array}{l}A=[1,2,3] \\B=[4,5,6]\end{array}\]Which one of the following statements results in $\mathrm{A}=[...
Arjun
3.9k
views
asked
Feb 27, 2025
Programming in Python
gateda-2025
programming-in-python
python-programming
list
easy
one-mark
+
–
2
2 votes
2
2 answers
3.1k
3.1k views
GATE DA 2025 | Question: 37
Consider the following Python code snippet.\[\begin{array}{l}\mathrm{A} = \{ \text{”this”, ”that”} \} \\\mathrm{B} = \{ \text{”that”, ”other”} \} \\\mathrm{C} = \{ ...
Arjun
3.1k
views
asked
Feb 27, 2025
Programming in Python
gateda-2025
programming-in-python
python-programming
two-marks
+
–
4
4 votes
3
3 answers
3.5k
3.5k views
GATE DA 2025 | Question: 53
Consider the following Python code snippet.def f(a,b): if (a==0): return b if (a%2==1): return 2*f((a-1)/2,b) return b+f(a-1,b) print(f(15,10))The value printed by the co...
Arjun
3.5k
views
asked
Feb 27, 2025
Programming in Python
gateda-2025
programming-in-python
python-programming
numerical-answers
easy
two-marks
+
–
Page:
1
2
3
next »