Q&A CBSE12A-2018-B01D #6101
Question:
Find and write the output of the following python code:
Data = ["P",20,"R",10,"S",30]
Times = 0
Alpha = ""
Add = 0
for C in range(1,6,2):
Times= Times + C
Alpha= Alpha + Data[C-1]+"$"
Add = Add + Data[C]
print Times,Add,Alpha
Answer:
1 20 P$
4 30 P$R$
9 60 P$R$S$
