From daaf9086fe52fde706c00d33d202726c660bd56a Mon Sep 17 00:00:00 2001 From: ChrisAchinga Date: Sat, 19 Dec 2020 16:36:30 +0300 Subject: [PATCH 1/3] file arrangement --- .../week-1/variables/{string-variables => }/combine_strings.py | 0 source/week-1/variables/{numeric-variables => }/doing_math.py | 0 source/week-1/variables/{string-variables => }/f_strings.py | 0 source/week-1/variables/{string-variables => }/format_strings.py | 0 .../{numeric-variables => }/numbers_treated_as_strings.py | 0 source/week-1/variables/{numeric-variables => }/string-to-num.py | 0 .../week-1/variables/{string-variables => }/string_functions.py | 0 .../week-1/variables/{numeric-variables => }/strings-and-num.py | 0 .../variables/{string-variables => }/strings_in_variables.py | 0 .../{numeric-variables/declare-variables.py => variables.py} | 1 + 10 files changed, 1 insertion(+) rename source/week-1/variables/{string-variables => }/combine_strings.py (100%) rename source/week-1/variables/{numeric-variables => }/doing_math.py (100%) rename source/week-1/variables/{string-variables => }/f_strings.py (100%) rename source/week-1/variables/{string-variables => }/format_strings.py (100%) rename source/week-1/variables/{numeric-variables => }/numbers_treated_as_strings.py (100%) rename source/week-1/variables/{numeric-variables => }/string-to-num.py (100%) rename source/week-1/variables/{string-variables => }/string_functions.py (100%) rename source/week-1/variables/{numeric-variables => }/strings-and-num.py (100%) rename source/week-1/variables/{string-variables => }/strings_in_variables.py (100%) rename source/week-1/variables/{numeric-variables/declare-variables.py => variables.py} (99%) diff --git a/source/week-1/variables/string-variables/combine_strings.py b/source/week-1/variables/combine_strings.py similarity index 100% rename from source/week-1/variables/string-variables/combine_strings.py rename to source/week-1/variables/combine_strings.py diff --git a/source/week-1/variables/numeric-variables/doing_math.py b/source/week-1/variables/doing_math.py similarity index 100% rename from source/week-1/variables/numeric-variables/doing_math.py rename to source/week-1/variables/doing_math.py diff --git a/source/week-1/variables/string-variables/f_strings.py b/source/week-1/variables/f_strings.py similarity index 100% rename from source/week-1/variables/string-variables/f_strings.py rename to source/week-1/variables/f_strings.py diff --git a/source/week-1/variables/string-variables/format_strings.py b/source/week-1/variables/format_strings.py similarity index 100% rename from source/week-1/variables/string-variables/format_strings.py rename to source/week-1/variables/format_strings.py diff --git a/source/week-1/variables/numeric-variables/numbers_treated_as_strings.py b/source/week-1/variables/numbers_treated_as_strings.py similarity index 100% rename from source/week-1/variables/numeric-variables/numbers_treated_as_strings.py rename to source/week-1/variables/numbers_treated_as_strings.py diff --git a/source/week-1/variables/numeric-variables/string-to-num.py b/source/week-1/variables/string-to-num.py similarity index 100% rename from source/week-1/variables/numeric-variables/string-to-num.py rename to source/week-1/variables/string-to-num.py diff --git a/source/week-1/variables/string-variables/string_functions.py b/source/week-1/variables/string_functions.py similarity index 100% rename from source/week-1/variables/string-variables/string_functions.py rename to source/week-1/variables/string_functions.py diff --git a/source/week-1/variables/numeric-variables/strings-and-num.py b/source/week-1/variables/strings-and-num.py similarity index 100% rename from source/week-1/variables/numeric-variables/strings-and-num.py rename to source/week-1/variables/strings-and-num.py diff --git a/source/week-1/variables/string-variables/strings_in_variables.py b/source/week-1/variables/strings_in_variables.py similarity index 100% rename from source/week-1/variables/string-variables/strings_in_variables.py rename to source/week-1/variables/strings_in_variables.py diff --git a/source/week-1/variables/numeric-variables/declare-variables.py b/source/week-1/variables/variables.py similarity index 99% rename from source/week-1/variables/numeric-variables/declare-variables.py rename to source/week-1/variables/variables.py index 8d762ae..bc608bc 100644 --- a/source/week-1/variables/numeric-variables/declare-variables.py +++ b/source/week-1/variables/variables.py @@ -7,3 +7,4 @@ pi = 3.1468596846351 print(pi) + From 49742077ce3161238c76917492e3f43a606f346a Mon Sep 17 00:00:00 2001 From: ChrisAchinga Date: Sat, 19 Dec 2020 16:37:58 +0300 Subject: [PATCH 2/3] added gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..dbe9c82 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.vscode/ \ No newline at end of file From d3fe9ca00c0ae35d5926bdd6aeff284ed97ed8ea Mon Sep 17 00:00:00 2001 From: ChrisAchinga Date: Sun, 20 Dec 2020 10:15:27 +0300 Subject: [PATCH 3/3] syntax --- source/week-1/error-handling/logic.py | 6 ++++-- source/week-1/variables/string_functions.py | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/week-1/error-handling/logic.py b/source/week-1/error-handling/logic.py index 5376a92..3467dcc 100644 --- a/source/week-1/error-handling/logic.py +++ b/source/week-1/error-handling/logic.py @@ -1,4 +1,6 @@ -x = 206 -y = 42 +x = 45 +y = 206 if x < y: print(str(x) + ' is greater than ' + str(y)) +else: + print('all cool') \ No newline at end of file diff --git a/source/week-1/variables/string_functions.py b/source/week-1/variables/string_functions.py index c89b6bd..8d36e17 100644 --- a/source/week-1/variables/string_functions.py +++ b/source/week-1/variables/string_functions.py @@ -14,4 +14,4 @@ # count will count the number of occurrences of the value specified # in the string, in this case how many times the letter 'a' appears -print(sentence.count('a')) +print(sentence.count('s'))