Python
n=[]
s=int(input())
sm=0
while s!='':
n.append(int(s))
if int(s) % 10 == 2:
sm+=int(s)
s=input()
print(n)
print(sm)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Python
n=[]
s=int(input())
sm=0
while s!='':
n.append(int(s))
if int(s) % 10 == 2:
sm+=int(s)
s=input()
print(n)
print(sm)