diff --git a/.vs/Mock-python/v17/.wsuo b/.vs/Mock-python/v17/.wsuo new file mode 100644 index 0000000..c45a391 Binary files /dev/null and b/.vs/Mock-python/v17/.wsuo differ diff --git a/.vs/Mock-python/v17/DocumentLayout.backup.json b/.vs/Mock-python/v17/DocumentLayout.backup.json new file mode 100644 index 0000000..8f22caa --- /dev/null +++ b/.vs/Mock-python/v17/DocumentLayout.backup.json @@ -0,0 +1,123 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:main.py||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:test_main.py||{8B382828-6202-11D1-8870-0000F87579D2}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 8, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c64b9c2-e352-428e-a56d-0ace190b99a6}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "README.md", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md", + "RelativeDocumentMoniker": "README.md", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md", + "RelativeToolTip": "README.md", + "ViewState": "AgIAAC0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-11-05T10:17:03.913Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "test_main.py", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py", + "RelativeDocumentMoniker": "test_main.py", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py", + "RelativeToolTip": "test_main.py", + "ViewState": "AgIAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|", + "WhenOpened": "2025-11-05T10:16:55.395Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "main.py", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py", + "RelativeDocumentMoniker": "main.py", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py", + "RelativeToolTip": "main.py", + "ViewState": "AgIAAFcAAAAAAAAAAAAAAHkAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|", + "WhenOpened": "2025-11-05T10:06:01.817Z", + "EditorCaption": "" + } + ] + }, + { + "DockedWidth": 67, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}" + } + ] + }, + { + "DockedWidth": 335, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/Mock-python/v17/DocumentLayout.json b/.vs/Mock-python/v17/DocumentLayout.json new file mode 100644 index 0000000..8f22caa --- /dev/null +++ b/.vs/Mock-python/v17/DocumentLayout.json @@ -0,0 +1,123 @@ +{ + "Version": 1, + "WorkspaceRootPath": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\", + "Documents": [ + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:main.py||{8B382828-6202-11D1-8870-0000F87579D2}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:README.md||{EFC0BB08-EA7D-40C6-A696-C870411A895B}" + }, + { + "AbsoluteMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py||{8B382828-6202-11D1-8870-0000F87579D2}", + "RelativeMoniker": "D:0:0:{A2FE74E1-B743-11D0-AE1A-00A0C90FFFC3}|\u003CMiscFiles\u003E|solutionrelative:test_main.py||{8B382828-6202-11D1-8870-0000F87579D2}" + } + ], + "DocumentGroupContainers": [ + { + "Orientation": 0, + "VerticalTabListWidth": 256, + "DocumentGroups": [ + { + "DockedWidth": 200, + "SelectedChildIndex": 8, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{e506b91c-c606-466a-90a9-123d1d1e12b3}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{b1e99781-ab81-11d0-b683-00aa00a3ee26}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{34e76e81-ee4a-11d0-ae2e-00a0c90fffc3}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{eefa5220-e298-11d0-8f78-00a0c9110057}" + }, + { + "$type": "Bookmark", + "Name": "ST:0:0:{1c64b9c2-e352-428e-a56d-0ace190b99a6}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{75188d03-9892-4ae2-abf1-207126247ce5}" + }, + { + "$type": "Document", + "DocumentIndex": 1, + "Title": "README.md", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md", + "RelativeDocumentMoniker": "README.md", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\README.md", + "RelativeToolTip": "README.md", + "ViewState": "AgIAAC0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.001818|", + "WhenOpened": "2025-11-05T10:17:03.913Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 2, + "Title": "test_main.py", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py", + "RelativeDocumentMoniker": "test_main.py", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\test_main.py", + "RelativeToolTip": "test_main.py", + "ViewState": "AgIAABkAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|", + "WhenOpened": "2025-11-05T10:16:55.395Z", + "EditorCaption": "" + }, + { + "$type": "Document", + "DocumentIndex": 0, + "Title": "main.py", + "DocumentMoniker": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py", + "RelativeDocumentMoniker": "main.py", + "ToolTip": "C:\\Users\\nloyi\\source\\repos\\Mock-python\\main.py", + "RelativeToolTip": "main.py", + "ViewState": "AgIAAFcAAAAAAAAAAAAAAHkAAAAAAAAAAAAAAA==", + "Icon": "ae27a6b0-e345-4288-96df-5eaf394ee369.002457|", + "WhenOpened": "2025-11-05T10:06:01.817Z", + "EditorCaption": "" + } + ] + }, + { + "DockedWidth": 67, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:0:0:{3ae79031-e1bc-11d0-8f78-00a0c9110057}" + } + ] + }, + { + "DockedWidth": 335, + "SelectedChildIndex": -1, + "Children": [ + { + "$type": "Bookmark", + "Name": "ST:129:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{116d2292-e37d-41cd-a077-ebacac4c8cc4}" + }, + { + "$type": "Bookmark", + "Name": "ST:128:0:{1fc202d4-d401-403c-9834-5b218574bb67}" + } + ] + } + ] + } + ] +} \ No newline at end of file diff --git a/.vs/ProjectSettings.json b/.vs/ProjectSettings.json new file mode 100644 index 0000000..f8b4888 --- /dev/null +++ b/.vs/ProjectSettings.json @@ -0,0 +1,3 @@ +{ + "CurrentProjectSetting": null +} \ No newline at end of file diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 0000000..2a9a87f --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\C:\\Users\\nloyi\\Source\\Repos\\Mock-python", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/.vs/slnx.sqlite b/.vs/slnx.sqlite new file mode 100644 index 0000000..d49bd37 Binary files /dev/null and b/.vs/slnx.sqlite differ diff --git a/main.py b/main.py index 2719019..5de8cbf 100644 --- a/main.py +++ b/main.py @@ -11,7 +11,8 @@ add_numbers(-1, 4) -> 3 """ def add_numbers(a, b): - pass + sum = a + b + return sum # Exercise 2: Subtract Numbers @@ -23,7 +24,8 @@ def add_numbers(a, b): subtract_numbers(3, 5) -> -2 """ def subtract_numbers(a, b): - pass + diff = a - b + return diff # Exercise 3: FruitLoop @@ -42,7 +44,11 @@ def subtract_numbers(a, b): Loop """ def fruitloop(n): - pass + for num in n: + if num**3 and num < n: + return print("Fruit") + if num**5 and num < n: + return print("Loop") # Exercise 4: Fibonacci @@ -66,8 +72,8 @@ def fibonacci(n: int): find_max([-1,-5,-3]) -> -1 """ def find_max(numbers: list): - pass - + return print(max(numbers)) + # Exercise 6: Find Minimum """ @@ -78,7 +84,8 @@ def find_max(numbers: list): find_min([-1,-5,-3]) -> -5 """ def find_min(numbers: list): - pass + return print(min(numbers)) + # Exercise 7: Person Class @@ -98,9 +105,12 @@ def find_min(numbers: list): """ class Person: def __init__(self, name: str, age: int): + self.name = name + self.age = age pass def greet(self): + return print(f"Hello, my name is {self.name} and I am {self.age} years old.") pass @@ -110,15 +120,15 @@ def greet(self): # Example usage (can be removed or commented out during testing) # This part is just for demonstration and won't be executed during tests. # Remove docstrings to see how the functions and class work. -""" + if __name__ == "__main__": - # Example usage (can be removed or commented out during testing) + #Example usage (can be removed or commented out during testing) print(add_numbers(2, 3)) # Should print 5 print(subtract_numbers(5, 3)) # Should print 2 - fruitloop(15) # Should print numbers and words as per the rules + print(fruitloop(15)) # Should print numbers and words as per the rules print(fibonacci(10)) # Should print 55 print(find_max([1, 2, 3, 4, 5])) # Should print 5 print(find_min([1, 2, 3, 4, 5])) # Should print 1 p = Person("Alice", 25) print(p.greet()) # Should print greeting message -""" +