From 67546ff1ac48a51dd8bc1f49f58f809eac5bf134 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Mon, 19 Feb 2024 17:09:37 +0100 Subject: [PATCH] =?UTF-8?q?=C3=84ndrat=20exit=20till=20sys.exit?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- kapitel10/forenkla-brak.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kapitel10/forenkla-brak.py b/kapitel10/forenkla-brak.py index b392f84..cbc062d 100644 --- a/kapitel10/forenkla-brak.py +++ b/kapitel10/forenkla-brak.py @@ -1,12 +1,12 @@ #!/usr/bin/env python3 - +import sys import math try: t = int(input("Ange täljaren: ")) n = int(input("Ange nämnaren: ")) except ValueError: - exit("Ange endast heltal") + sys.exit("Ange endast heltal") sgd = math.gcd(t, n)