From 8d6861f7428747f761c66eea0cc201c22b8ab12b Mon Sep 17 00:00:00 2001 From: h7x4 Date: Tue, 15 Sep 2020 09:27:47 +0200 Subject: [PATCH] Rename tasks in order to be importable --- Exercise 1/10 - Bakekurs/{10-a.py => task10a.py} | 0 Exercise 1/10 - Bakekurs/{10-b.py => task10b.py} | 0 .../{11-a.py => task11a.py} | 0 .../{11-b.py => task11b.py} | 0 .../{11-c.py => task11c.py} | 0 .../8_-_Vitenskapelig_notasjon/{8-a.py => task8a.py} | 0 .../8_-_Vitenskapelig_notasjon/{8-b.py => task8b.py} | 0 Exercise 1/{9 - Tetraeder.py => task9.py} | 0 .../{10a.py => task10a.py} | 0 .../{10b.py => task10b.py} | 0 .../{10c.py => task10c.py} | 0 .../11 - Andregradsligning/{11a.py => task11a.py} | 0 .../{11b.py => 11 - Andregradsligning/task11b.py} | 0 .../{8a.py => task8a.py} | 0 .../{8b.py => task8b.py} | 0 .../{8c.py => task8c.py} | 0 Exercise 2/9 - Skatteetaten/{t9a.py => task9a.py} | 0 Exercise 2/9 - Skatteetaten/{t9b.py => task9b.py} | 0 Exercise 2/9 - Skatteetaten/{9c.py => task9c.py} | 11 +++++------ Exercise 3/11 - Doble lokker/{11a.py => task11a.py} | 2 ++ Exercise 3/11 - Doble lokker/{11b.py => task11b.py} | 0 Exercise 3/11 - Doble lokker/{11c.py => task11c.py} | 0 Exercise 3/9 - Alternerende sum/{9a.py => task9a.py} | 0 Exercise 3/9 - Alternerende sum/{9b.py => task9b.py} | 0 Exercise 3/{10.py => task10.py} | 0 Exercise 3/{8.py => task8.py} | 0 26 files changed, 7 insertions(+), 6 deletions(-) rename Exercise 1/10 - Bakekurs/{10-a.py => task10a.py} (100%) rename Exercise 1/10 - Bakekurs/{10-b.py => task10b.py} (100%) rename Exercise 1/11 - James Bond and Operation Round/{11-a.py => task11a.py} (100%) rename Exercise 1/11 - James Bond and Operation Round/{11-b.py => task11b.py} (100%) rename Exercise 1/11 - James Bond and Operation Round/{11-c.py => task11c.py} (100%) rename Exercise 1/8_-_Vitenskapelig_notasjon/{8-a.py => task8a.py} (100%) rename Exercise 1/8_-_Vitenskapelig_notasjon/{8-b.py => task8b.py} (100%) rename Exercise 1/{9 - Tetraeder.py => task9.py} (100%) rename Exercise 2/10 - Datamaskinen som tigget epler/{10a.py => task10a.py} (100%) rename Exercise 2/10 - Datamaskinen som tigget epler/{10b.py => task10b.py} (100%) rename Exercise 2/10 - Datamaskinen som tigget epler/{10c.py => task10c.py} (100%) rename Exercise 2/11 - Andregradsligning/{11a.py => task11a.py} (100%) rename Exercise 2/{11b.py => 11 - Andregradsligning/task11b.py} (100%) rename Exercise 2/8 - Billettpriser og rabatter/{8a.py => task8a.py} (100%) rename Exercise 2/8 - Billettpriser og rabatter/{8b.py => task8b.py} (100%) rename Exercise 2/8 - Billettpriser og rabatter/{8c.py => task8c.py} (100%) rename Exercise 2/9 - Skatteetaten/{t9a.py => task9a.py} (100%) rename Exercise 2/9 - Skatteetaten/{t9b.py => task9b.py} (100%) rename Exercise 2/9 - Skatteetaten/{9c.py => task9c.py} (53%) rename Exercise 3/11 - Doble lokker/{11a.py => task11a.py} (94%) rename Exercise 3/11 - Doble lokker/{11b.py => task11b.py} (100%) rename Exercise 3/11 - Doble lokker/{11c.py => task11c.py} (100%) rename Exercise 3/9 - Alternerende sum/{9a.py => task9a.py} (100%) rename Exercise 3/9 - Alternerende sum/{9b.py => task9b.py} (100%) rename Exercise 3/{10.py => task10.py} (100%) rename Exercise 3/{8.py => task8.py} (100%) diff --git a/Exercise 1/10 - Bakekurs/10-a.py b/Exercise 1/10 - Bakekurs/task10a.py similarity index 100% rename from Exercise 1/10 - Bakekurs/10-a.py rename to Exercise 1/10 - Bakekurs/task10a.py diff --git a/Exercise 1/10 - Bakekurs/10-b.py b/Exercise 1/10 - Bakekurs/task10b.py similarity index 100% rename from Exercise 1/10 - Bakekurs/10-b.py rename to Exercise 1/10 - Bakekurs/task10b.py diff --git a/Exercise 1/11 - James Bond and Operation Round/11-a.py b/Exercise 1/11 - James Bond and Operation Round/task11a.py similarity index 100% rename from Exercise 1/11 - James Bond and Operation Round/11-a.py rename to Exercise 1/11 - James Bond and Operation Round/task11a.py diff --git a/Exercise 1/11 - James Bond and Operation Round/11-b.py b/Exercise 1/11 - James Bond and Operation Round/task11b.py similarity index 100% rename from Exercise 1/11 - James Bond and Operation Round/11-b.py rename to Exercise 1/11 - James Bond and Operation Round/task11b.py diff --git a/Exercise 1/11 - James Bond and Operation Round/11-c.py b/Exercise 1/11 - James Bond and Operation Round/task11c.py similarity index 100% rename from Exercise 1/11 - James Bond and Operation Round/11-c.py rename to Exercise 1/11 - James Bond and Operation Round/task11c.py diff --git a/Exercise 1/8_-_Vitenskapelig_notasjon/8-a.py b/Exercise 1/8_-_Vitenskapelig_notasjon/task8a.py similarity index 100% rename from Exercise 1/8_-_Vitenskapelig_notasjon/8-a.py rename to Exercise 1/8_-_Vitenskapelig_notasjon/task8a.py diff --git a/Exercise 1/8_-_Vitenskapelig_notasjon/8-b.py b/Exercise 1/8_-_Vitenskapelig_notasjon/task8b.py similarity index 100% rename from Exercise 1/8_-_Vitenskapelig_notasjon/8-b.py rename to Exercise 1/8_-_Vitenskapelig_notasjon/task8b.py diff --git a/Exercise 1/9 - Tetraeder.py b/Exercise 1/task9.py similarity index 100% rename from Exercise 1/9 - Tetraeder.py rename to Exercise 1/task9.py diff --git a/Exercise 2/10 - Datamaskinen som tigget epler/10a.py b/Exercise 2/10 - Datamaskinen som tigget epler/task10a.py similarity index 100% rename from Exercise 2/10 - Datamaskinen som tigget epler/10a.py rename to Exercise 2/10 - Datamaskinen som tigget epler/task10a.py diff --git a/Exercise 2/10 - Datamaskinen som tigget epler/10b.py b/Exercise 2/10 - Datamaskinen som tigget epler/task10b.py similarity index 100% rename from Exercise 2/10 - Datamaskinen som tigget epler/10b.py rename to Exercise 2/10 - Datamaskinen som tigget epler/task10b.py diff --git a/Exercise 2/10 - Datamaskinen som tigget epler/10c.py b/Exercise 2/10 - Datamaskinen som tigget epler/task10c.py similarity index 100% rename from Exercise 2/10 - Datamaskinen som tigget epler/10c.py rename to Exercise 2/10 - Datamaskinen som tigget epler/task10c.py diff --git a/Exercise 2/11 - Andregradsligning/11a.py b/Exercise 2/11 - Andregradsligning/task11a.py similarity index 100% rename from Exercise 2/11 - Andregradsligning/11a.py rename to Exercise 2/11 - Andregradsligning/task11a.py diff --git a/Exercise 2/11b.py b/Exercise 2/11 - Andregradsligning/task11b.py similarity index 100% rename from Exercise 2/11b.py rename to Exercise 2/11 - Andregradsligning/task11b.py diff --git a/Exercise 2/8 - Billettpriser og rabatter/8a.py b/Exercise 2/8 - Billettpriser og rabatter/task8a.py similarity index 100% rename from Exercise 2/8 - Billettpriser og rabatter/8a.py rename to Exercise 2/8 - Billettpriser og rabatter/task8a.py diff --git a/Exercise 2/8 - Billettpriser og rabatter/8b.py b/Exercise 2/8 - Billettpriser og rabatter/task8b.py similarity index 100% rename from Exercise 2/8 - Billettpriser og rabatter/8b.py rename to Exercise 2/8 - Billettpriser og rabatter/task8b.py diff --git a/Exercise 2/8 - Billettpriser og rabatter/8c.py b/Exercise 2/8 - Billettpriser og rabatter/task8c.py similarity index 100% rename from Exercise 2/8 - Billettpriser og rabatter/8c.py rename to Exercise 2/8 - Billettpriser og rabatter/task8c.py diff --git a/Exercise 2/9 - Skatteetaten/t9a.py b/Exercise 2/9 - Skatteetaten/task9a.py similarity index 100% rename from Exercise 2/9 - Skatteetaten/t9a.py rename to Exercise 2/9 - Skatteetaten/task9a.py diff --git a/Exercise 2/9 - Skatteetaten/t9b.py b/Exercise 2/9 - Skatteetaten/task9b.py similarity index 100% rename from Exercise 2/9 - Skatteetaten/t9b.py rename to Exercise 2/9 - Skatteetaten/task9b.py diff --git a/Exercise 2/9 - Skatteetaten/9c.py b/Exercise 2/9 - Skatteetaten/task9c.py similarity index 53% rename from Exercise 2/9 - Skatteetaten/9c.py rename to Exercise 2/9 - Skatteetaten/task9c.py index accf923..2f60590 100644 --- a/Exercise 2/9 - Skatteetaten/9c.py +++ b/Exercise 2/9 - Skatteetaten/task9c.py @@ -1,14 +1,13 @@ -from t9a import mainBranch - -from t9b import fritidsboligBranch, secondaryHouseBranch, safeQuestion +from task9a import mainBranch +from task9b import fritidsboligBranch, secondaryHouseBranch, safeQuestion choices = ['egen bolig', 'sekundærbolig', 'fritidsbolig'] choices.extend([choice.capitalize() for choice in choices]) choice = safeQuestion( - question='Skriv inn hustype for skatteutregning (egen bolig, sekundærbolig, fritidsbolig): ', - choices=choices -) + question= + 'Skriv inn hustype for skatteutregning (egen bolig, sekundærbolig, fritidsbolig): ', + choices=choices) if choice in ['egen bolig', 'Egen bolig']: mainBranch() diff --git a/Exercise 3/11 - Doble lokker/11a.py b/Exercise 3/11 - Doble lokker/task11a.py similarity index 94% rename from Exercise 3/11 - Doble lokker/11a.py rename to Exercise 3/11 - Doble lokker/task11a.py index a7424c2..7932e9c 100644 --- a/Exercise 3/11 - Doble lokker/11a.py +++ b/Exercise 3/11 - Doble lokker/task11a.py @@ -1,3 +1,5 @@ +from common import inputTypeCheck + def numberPyramid(length): for i in range(length): row = '' diff --git a/Exercise 3/11 - Doble lokker/11b.py b/Exercise 3/11 - Doble lokker/task11b.py similarity index 100% rename from Exercise 3/11 - Doble lokker/11b.py rename to Exercise 3/11 - Doble lokker/task11b.py diff --git a/Exercise 3/11 - Doble lokker/11c.py b/Exercise 3/11 - Doble lokker/task11c.py similarity index 100% rename from Exercise 3/11 - Doble lokker/11c.py rename to Exercise 3/11 - Doble lokker/task11c.py diff --git a/Exercise 3/9 - Alternerende sum/9a.py b/Exercise 3/9 - Alternerende sum/task9a.py similarity index 100% rename from Exercise 3/9 - Alternerende sum/9a.py rename to Exercise 3/9 - Alternerende sum/task9a.py diff --git a/Exercise 3/9 - Alternerende sum/9b.py b/Exercise 3/9 - Alternerende sum/task9b.py similarity index 100% rename from Exercise 3/9 - Alternerende sum/9b.py rename to Exercise 3/9 - Alternerende sum/task9b.py diff --git a/Exercise 3/10.py b/Exercise 3/task10.py similarity index 100% rename from Exercise 3/10.py rename to Exercise 3/task10.py diff --git a/Exercise 3/8.py b/Exercise 3/task8.py similarity index 100% rename from Exercise 3/8.py rename to Exercise 3/task8.py