Login and Register ×
Check your Email for the OTP
Python Programming Language MCQ Python Tuple MCQ
⚠ Report ✓ Question Verified Copy Link
a=(23,34,65,20,5) s=0 for i in a: if i%2==0: s=s+a[i] print(s)
Explanation:
--------------------------------------------------------------------------- IndexError Traceback (most recent call last) Input In [6], in () 3 for i in a: 4 if i%2==0: ----> 5 s=s+a[i] 6 print(s) IndexError: tuple index out of range
Related Topic:
Share Above MCQ
Learn More MCQ Questions from Python Programming Language MCQ Python Tuple MCQ