From 073967d4b4e7dc53ffc1788fceb32ebfb70b94fd Mon Sep 17 00:00:00 2001 From: CharlesLake <83225043+CharlesLake@users.noreply.github.com> Date: Tue, 28 Sep 2021 16:44:56 -0400 Subject: [PATCH 1/4] Add files via upload --- solveCharlesLake.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 solveCharlesLake.py diff --git a/solveCharlesLake.py b/solveCharlesLake.py new file mode 100644 index 000000000..8b47075c1 --- /dev/null +++ b/solveCharlesLake.py @@ -0,0 +1,25 @@ + +def encode(l): #s is the input string + + encoding = " " #ouput string for encode(l) + + i = 0 + while i < len(l): + # the number of same characters and a certain index + count = 1 + + while i + 1 < len(l) and l[i] == l[i + 1]: + count = count + 1 + i = i + 1 + + # record the ammount of times a character is used and add it to hte output string + encoding += str(count) + l[i] + i = i + 1 + + return encoding + + +if __name__ == '__main__': + + l = 'ttttbccaadrrrr' + print(encode(l)) From 4e13831cc7dff0ed927bb41f8bdda21e0708da5a Mon Sep 17 00:00:00 2001 From: CharlesLake <83225043+CharlesLake@users.noreply.github.com> Date: Tue, 28 Sep 2021 17:42:01 -0400 Subject: [PATCH 2/4] Add files via upload --- challenge.html | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 challenge.html diff --git a/challenge.html b/challenge.html new file mode 100644 index 000000000..fe80bbd43 --- /dev/null +++ b/challenge.html @@ -0,0 +1,28 @@ + + + + + General Motor Company + + + + + +
+
+ Name + + +
+ +
+ Contact Details + + +
+ + +
+ + + \ No newline at end of file From b29958156a9fe112c608046802330cd3bece76e6 Mon Sep 17 00:00:00 2001 From: CharlesLake <83225043+CharlesLake@users.noreply.github.com> Date: Tue, 28 Sep 2021 19:02:42 -0400 Subject: [PATCH 3/4] Delete challenge.html --- challenge.html | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 challenge.html diff --git a/challenge.html b/challenge.html deleted file mode 100644 index fe80bbd43..000000000 --- a/challenge.html +++ /dev/null @@ -1,28 +0,0 @@ - - - - - General Motor Company - - - - - -
-
- Name - - -
- -
- Contact Details - - -
- - -
- - - \ No newline at end of file From 3310bbfffee6179f804f11ef91c34707def61835 Mon Sep 17 00:00:00 2001 From: CharlesLake <83225043+CharlesLake@users.noreply.github.com> Date: Tue, 28 Sep 2021 19:02:54 -0400 Subject: [PATCH 4/4] Add files via upload --- frontend.html | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 frontend.html diff --git a/frontend.html b/frontend.html new file mode 100644 index 000000000..81936e633 --- /dev/null +++ b/frontend.html @@ -0,0 +1,40 @@ + + + + + General Motor Company + + + + + + + +

Contact Us

+
+ +
+
+
+
+
+
+
+
+ + +
+ + + + \ No newline at end of file