summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazMalhotra2020-02-07 20:52:53 -0800
committerKazMalhotra2020-02-07 20:52:53 -0800
commit142394a09328ed6c3db560f1edb06c436100173f (patch)
tree92900b62875a32f711f701138b7ef855bf8fda62
downloadaur-142394a09328ed6c3db560f1edb06c436100173f.tar.gz
init
-rw-r--r--.SRCINFO13
-rw-r--r--PKGBUILD13
-rw-r--r--citardauq.py20
3 files changed, 46 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..980538e7a0b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,13 @@
+pkgbase = citardauq
+ pkgdesc = A CLI tool for solving quadratic equations
+ pkgver = 1.0
+ pkgrel = 1
+ url = https://github.com/KazMalhotra/citardauq
+ arch = any
+ license = MIT
+ depends = python
+ source = https://github.com/KazMalhotra/quadratic/blob/master/quadritic-1.0-1-any.pkg.tar.xz?raw=true
+ md5sums = b6dfdfb3d79c0709e1154e9f55695726
+
+pkgname = citardauq
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..07f97d6bbaf
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,13 @@
+# Maintainer: Kaz Malhotra <kazmal@protonmail.com>
+
+pkgname='citardauq'
+pkgver=1.0
+pkgrel=1
+pkgdesc='A CLI tool for solving quadratic equations'
+arch=('any')
+url='https://github.com/KazMalhotra/citardauq'
+license=('MIT')
+depends=('python')
+source=("https://github.com/KazMalhotra/quadratic/blob/master/quadritic-1.0-1-any.pkg.tar.xz?raw=true")
+md5sums=('92b48b83f0e6d60f103c2bc6d1184712')
+md5sums=('b6dfdfb3d79c0709e1154e9f55695726')
diff --git a/citardauq.py b/citardauq.py
new file mode 100644
index 00000000000..dbb9c70db84
--- /dev/null
+++ b/citardauq.py
@@ -0,0 +1,20 @@
+import cmath, sys
+
+if len(sys.argv) != 4:
+ print("Please enter a, b, and c as arguments.")
+
+
+else:
+
+ a = float(sys.argv[1])
+ b = float(sys.argv[2])
+ c = float(sys.argv[3])
+
+ print('a is', a, 'b is', b, 'c is', c)
+
+ d = (b ** 2) - (4 * a * c)
+
+ sol0 = (-b - cmath.sqrt(d)) / (2*a)
+ sol1 = (-b + cmath.sqrt(d)) / (2*a)
+
+ print("X could be", sol0, "or", sol1)