Skip to content
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
Binary file modified __pycache__/main.cpython-310.pyc
Binary file not shown.
Binary file modified __pycache__/test_main.cpython-310.pyc
Binary file not shown.
64 changes: 61 additions & 3 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,15 @@
"""
def add_numbers(a, b):
pass
add_numbers(2,3) == 5
add_numbers(-1,4) == 4

return sum

print(add_numbers)





# Exercise 2: Subtract Numbers
Expand All @@ -23,7 +32,13 @@ def add_numbers(a, b):
subtract_numbers(3, 5) -> -2
"""
def subtract_numbers(a, b):
pass
pass

subtract_numbers = (5,3) == 2
subtract_numbers = (5,2) == -2

return subtract_numbers(2)
print(subtract_numbers)


# Exercise 3: FruitLoop
Expand All @@ -44,6 +59,19 @@ def subtract_numbers(a, b):
def fruitloop(n):
pass

fruitloop(n)
3
6
Fruit
5
Loop








# Exercise 4: Fibonacci
"""
Expand All @@ -68,6 +96,18 @@ def fibonacci(n: int):
def find_max(numbers: list):
pass

numbers = 3 ,-1
list = [1,2,3][-1,-3,-5]

for numbers in list:
return find_max
else:
numbers != list

print(find_max)




# Exercise 6: Find Minimum
"""
Expand All @@ -78,7 +118,15 @@ def find_max(numbers: list):
find_min([-1,-5,-3]) -> -5
"""
def find_min(numbers: list):
pass
pass

for i in range:
list != numbers

else:
numbers




# Exercise 7: Person Class
Expand All @@ -102,6 +150,16 @@ def __init__(self, name: str, age: int):

def greet(self):
pass

self.name = str
self.age = int

p = Person("Alice" ,"25")
p.greet() = "hello my name is Alice and I am 25 years old"







Expand All @@ -121,4 +179,4 @@ def greet(self):
print(find_min([1, 2, 3, 4, 5])) # Should print 1
p = Person("Alice", 25)
print(p.greet()) # Should print greeting message
"""
"""
Loading