Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged programming-in-python
0
votes
0
answers
1
Memory Based GATE DA 2024 | Question: 20
Consider the following Python code: S[1] = [1] x = [6, 3, 5, 4, 10] for i in range(2, len(x)): S[i] = [1] if x[i - 1]
Consider the following Python code:S = x = [6, 3, 5, 4, 10]for i in range(2, len(x)): S[i] = if x[i - 1]
GO Classes
120
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
2
Memory Based GATE DA 2024 | Question: 21
What does the following Python code do? \begin{verbatim} def fun(D, S_1, S_2): if S_1 < S_2: D[S_1], D[S_2] = D[S_2], D[S_1] fun(D, S_1 + 1, S_2 - 1) \end{verbatim}
What does the following Python code do?\begin{verbatim}def fun(D, S_1, S_2): if S_1 < S_2: D[S_1], D[S_2] = D[S_2], D[S_1] fun(D, S_1...
GO Classes
107
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
0
votes
0
answers
3
Memory Based GATE DA 2024 | Question: 49
Consider the following Python code: def countchildren(l, i): Some code Given lists if i > 2: return 1 ans = 1 for i in l.keys(): ans = ans + countchildren(l,i) return ans Example usage l = dict() l[1] = [2, 3] l[2] = [3, 4, 5] l[3] = [6, 7, 8] result = countchildren(l,1) print(result)
Consider the following Python code:def countchildren(l, i): Some code Given lists if i 2: return 1 ans = 1 for i in l.k...
GO Classes
119
views
GO Classes
asked
Feb 4
Programming
gate2024-da-memory-based
goclasses
programming
programming-in-python
+
–
To see more, click for the
full list of questions
or
popular tags
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register