From 2141c5b1f6270208a26b181c2a5bfe95ea1ba38b Mon Sep 17 00:00:00 2001 From: Klaudia Kandulska Date: Thu, 21 Jun 2018 12:48:23 +0000 Subject: [PATCH] Update 'Zadanie3' true/false dla reszty --- Zadanie3 | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Zadanie3 b/Zadanie3 index 3569a86..8780d01 100644 --- a/Zadanie3 +++ b/Zadanie3 @@ -46,7 +46,8 @@ def divide(message, poly16): def encode(message, poly16): - + + l_poly16 = len(poly16) # Dodajemy n-1 "0" do wiadomosci @@ -64,7 +65,10 @@ def decode(message2, poly16): l_poly16 = len(poly16) appended_message2 = message2 remainder = divide(appended_message2, poly16) - print("reszta : ", remainder) + for i in range(0, len(remainder)): + if '1' not in remainder: + print("true ") + print("false ")