4, then 2.5, then 6 with one space before it and one space after it.
class Reader:
def __init__(self):
self.good = []
self.bad = 0
def take(self):
text = input()
try:
self.good.append(int(text))
except ValueError:
self.bad += 1
r = Reader()
for _ in range(3):
r.take()
print(sum(r.good), r.bad)
What does the program print?Log in to join the discussion.
Loading…