Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Completing fex examaples #18

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,10 @@
"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,
"workbench.activityBar.visible": true,
"workbench.colorTheme": "Visual Studio Dark",
"workbench.fontAliasing": "antialiased",
"workbench.statusBar.visible": true
Expand Down
1 change: 1 addition & 0 deletions Ex_Files/01_01_begin/hello.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import this
Empty file removed Ex_Files/01_01_begin/local.txt
Empty file.
4 changes: 3 additions & 1 deletion Ex_Files/02_01_begin/main.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
RUN_INDENTED = False
RUN_INDENTED = True

message = "running unindented"

Expand All @@ -11,3 +11,5 @@
def my_function():
greet = "Hello"
return greet

print(my_function())
4 changes: 4 additions & 0 deletions Ex_Files/02_02_begin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,7 @@
formatted = greet_format.format(name)

print(intrupution, formatted)

print(formatted.upper())
print(formatted.lower())
print(formatted.replace("John", "Mubashir"))
2 changes: 2 additions & 0 deletions Ex_Files/02_04_begin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@
print(i)

# enumerate
for i, name in enumerate(NAMES):
print(f"{i}, {name}")
2 changes: 1 addition & 1 deletion Ex_Files/02_05_begin/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
3 changes: 3 additions & 0 deletions Ex_Files/03_04/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)