From 265f85ae561df18e8825d5a1414b21517f18d3f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Sun, 24 Nov 2019 22:49:31 +0200 Subject: [PATCH] theoretical vs real angles --- Karto/assignment4/measure.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/Karto/assignment4/measure.py b/Karto/assignment4/measure.py index a777e08..69451f8 100755 --- a/Karto/assignment4/measure.py +++ b/Karto/assignment4/measure.py @@ -52,11 +52,15 @@ pals = [ PAL(4, guess('150-15-41'), Dec('179.336')), ] +angle_sum = Dec(0) +for pal in pals: + angle_sum += pal.ang +theoretical_angle_sum = Dec(int((len(pals)-2)*180)) + if __name__ == '__main__': print(""" Pradinis direkcinis kampas: %.4f""" % (90 - A11_2) + """ """) - - for i in pals: - print(i) + print("angle sum %.4f, theoretical angle sum %d" % \ + (angle_sum, theoretical_angle_sum))