From: CptG9000 <71446401+CptG9000@users.noreply.github.com> Date: Thu, 2 Dec 2021 17:34:19 +0000 (+0000) Subject: Create 1.py X-Git-Url: https://fbox.kageds.com/gitweb/adventofcode.git/commitdiff_plain/c1f0f4a539b8fc50d071317d46e5d62be04b326c?hp=--cc Create 1.py --- c1f0f4a539b8fc50d071317d46e5d62be04b326c diff --git a/Gareth solution Python/1.py b/Gareth solution Python/1.py new file mode 100644 index 0000000..41a5f04 --- /dev/null +++ b/Gareth solution Python/1.py @@ -0,0 +1,24 @@ +numbers = [] +rolling = [] +while True: + a = input("") + if a == "a": + break + numbers.append(a) +print("Numbers are Inputed") +z = 0 +while True: + if z == len(numbers)-2: + break + a = int(numbers[z])+int(numbers[z+1])+int(numbers[z+2]) + rolling.append(a) + z = z + 1 +inc = 0 +x = 0 +while True: + if x == len(rolling)+1: + break + if int(rolling[x]) > int(rolling[x-1]): + inc = inc + 1 + x = x + 1 +print(inc) \ No newline at end of file