diff --git a/.vscode/settings.json b/.vscode/settings.json index ca20f958..a29a39eb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,7 +13,7 @@ "editor.tabSize": 2, "editor.useTabStops": true, "emmet.triggerExpansionOnTab": true, - "explorer.openEditors.visible": 0, + "explorer.openEditors.visible": 1, "files.autoSave": "afterDelay", "screencastMode.onlyKeyboardShortcuts": true, "terminal.integrated.fontSize": 18, diff --git a/Ex_Files/01_01_begin/hello.py b/Ex_Files/01_01_begin/hello.py new file mode 100644 index 00000000..9839e63b --- /dev/null +++ b/Ex_Files/01_01_begin/hello.py @@ -0,0 +1 @@ +import this \ No newline at end of file diff --git a/Ex_Files/01_01_begin/local.txt b/Ex_Files/01_01_begin/local.txt deleted file mode 100644 index e69de29b..00000000 diff --git a/Ex_Files/02_01_begin/main.py b/Ex_Files/02_01_begin/main.py index de27c558..28d3b54d 100644 --- a/Ex_Files/02_01_begin/main.py +++ b/Ex_Files/02_01_begin/main.py @@ -1,4 +1,4 @@ -RUN_INDENTED = False +RUN_INDENTED = True message = "running unindented" @@ -11,3 +11,5 @@ def my_function(): greet = "Hello" return greet + +print(my_function()) \ No newline at end of file diff --git a/Ex_Files/02_02_begin/main.py b/Ex_Files/02_02_begin/main.py index 85a3ff30..3ecc7276 100644 --- a/Ex_Files/02_02_begin/main.py +++ b/Ex_Files/02_02_begin/main.py @@ -10,3 +10,7 @@ formatted = greet_format.format(name) print(intrupution, formatted) + +print(formatted.upper()) +print(formatted.lower()) +print(formatted.replace("John", "Mubashir")) \ No newline at end of file diff --git a/Ex_Files/02_04_begin/main.py b/Ex_Files/02_04_begin/main.py index 6b7b54c6..93d40de1 100644 --- a/Ex_Files/02_04_begin/main.py +++ b/Ex_Files/02_04_begin/main.py @@ -19,3 +19,5 @@ print(i) # enumerate +for i, name in enumerate(NAMES): + print(f"{i}, {name}") \ No newline at end of file diff --git a/Ex_Files/02_05_begin/main.py b/Ex_Files/02_05_begin/main.py index 2256e801..0b4744f2 100644 --- a/Ex_Files/02_05_begin/main.py +++ b/Ex_Files/02_05_begin/main.py @@ -6,7 +6,7 @@ CODE_SPACE = "code_space" LOCAL = "local" -current_env = os.environ.get("ENV_NAME", DEVELOPMENT) +current_env = os.environ.get("ENV_NAME", LOCAL) if current_env == DEVELOPMENT: print("Development environment") diff --git a/Ex_Files/03_04/main.py b/Ex_Files/03_04/main.py index 5ec888d8..806b72ee 100644 --- a/Ex_Files/03_04/main.py +++ b/Ex_Files/03_04/main.py @@ -29,6 +29,9 @@ laureates_beginning_with_a = [] # LinkedIn learner code here +for laurate in laureates: + if laurate ["name"][0] == "A": + laureates_beginning_with_a.append(laurate) with open("laureates.json", "w") as f: json.dump(laureates_beginning_with_a, f, indent=2)