Programming - Python
GATE Data Science & AI · 2 questions across 1 years (2026-2026) · 3% recurrence rate
Recurrence sparkline
2026–202620262026
Difficulty mix
med 50%
hard 50%
Question types
MCQ1
NAT1
All 2 questions on Programming - Python
2026 Q16
Consider the given Python program. 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(3, [])) Which of the following is the correct output of th...
Med✓
2026 Q58
Consider the given Python program. def fun(L, i=0): if i >= len(L)-1: return 0 if L[i] > L[i+1]: L[i+1], L[i] = L[i], L[i+1] return 1+fun(L, i+1) else: return fun(L, i+1) data = [5, 3, 4, 1, 2] count = 0 for _ in range(l...
Hard✓