Question

What is the value of sum after the following Python code executes?     sum = 0     for i in range(5):         if i % 2 == 0:             sum += i         else:             continue

B 2
C 4
D 6
E 10
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)