Ändrat exit till sys.exit
This commit is contained in:
parent
4b1fbe1822
commit
67546ff1ac
@ -1,12 +1,12 @@
|
|||||||
#!/usr/bin/env python3
|
#!/usr/bin/env python3
|
||||||
|
import sys
|
||||||
import math
|
import math
|
||||||
|
|
||||||
try:
|
try:
|
||||||
t = int(input("Ange täljaren: "))
|
t = int(input("Ange täljaren: "))
|
||||||
n = int(input("Ange nämnaren: "))
|
n = int(input("Ange nämnaren: "))
|
||||||
except ValueError:
|
except ValueError:
|
||||||
exit("Ange endast heltal")
|
sys.exit("Ange endast heltal")
|
||||||
|
|
||||||
sgd = math.gcd(t, n)
|
sgd = math.gcd(t, n)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user