From de49850989cb8b77e1b71c2e625acb913b9559db Mon Sep 17 00:00:00 2001 From: Mika Suhonen Date: Sun, 4 Dec 2022 07:55:18 +0200 Subject: [PATCH] Second answer + str print fix --- 04/d.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/04/d.py b/04/d.py index e9943ba..58c4d55 100644 --- a/04/d.py +++ b/04/d.py @@ -25,4 +25,9 @@ for p in pairs: if (set_a.issubset(set_b) or set_b.issubset(set_a)): tot1 += 1 -print("First answer: " + tot1) + if (set_a.intersection(set_b)): + tot2 += 1 + + +print("First answer: " + str(tot1)) +print("Second answer: " + str(tot2))