Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions and answers in Programming in Python
0
votes
2
answers
1
GATE DS&AI 2024 | Question: 31
Consider the following Python function: def $\operatorname{fun}(D, s 1, s 2)$ : if $\mathrm{s} 1<\mathrm{s} 2$ ... both inclusive. It swaps the elements in $\mathrm{D}$ at indices $\mathrm{s} 1$ and $\mathrm{s} 2$, and leaves the remaining elements unchanged.
Consider the following Python function:def $\operatorname{fun}(D, s 1, s 2)$ :if $\mathrm{s} 1<\mathrm{s} 2$ :$\mathrm{D}[\mathrm{s} 1], \mathrm{D}[\mathrm...
ankitgupta.1729
1.0k
views
ankitgupta.1729
answered
Feb 17
Programming in Python
gate-ds-ai-2024
programming
+
–
0
votes
1
answer
2
GATE DS&AI 2024 | Question: 28
Consider the following Python code: def count(child_dict, i): if i not in child_dict.keys(): return 1 ans $=1$ for $j$ in child_dict[i]: ans $+=$ count (child_dict, j) return ans child_dict $=$ dict () child_dict $[0]=[1,2]$ child_dict $[1]=[3,4,5]$ ... $)$ ) Which ONE of the following is the output of this code? $6$ $1$ $8$ $9$
Consider the following Python code:def count(child_dict, i):if i not in child_dict.keys():return 1ans $=1$for $j$ in child_dict[i]:ans $+=$ count (child_dict,...
Anmol Verma
892
views
Anmol Verma
answered
Feb 17
Programming in Python
gate-ds-ai-2024
programming
+
–
Help get things started by
asking a question
.
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register