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
27 changes: 27 additions & 0 deletions Homework1
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
from math import sqrt

def check_Circles(c1_c, c1_r, c2_c, c2_r):
if(c1_c == c2_c and c1_r == c2_r):
return "Matching"
c1_x, c1_y = c1_c
c2_x, c2_y = c2_c

distance = sqrt((c2_y - c1_y)**2 + (c2_x - c1_x)**2)

if(c1_r + c2_ < distance):
return "not intersecting"
if(c1_r + c2_r == distance):
return "touching"
if(c1_r + c2_r > distance):
if(distance + c1_r <= c2_r):
if(c1_r + distance == c2_r):
return "Circle B contains circle A and they are touching"
else:
return "Circle B contains circle A"
elif(distance + c2_r <= c1_r):
if(c1_r == c2_r + distance):
return "Circle A contains circle B and they are touching"
else:
return "Circle A contains circle B"
else:
return "Intersecting"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ $ marp 01.md && open 01.html
|9| Елена Върбанова | [elenavarbanova](https://github.com/elenavarbanova) | | |
|10| Златина Лилова | [zlatililova](https://github.com/zlatililova) | | |
|11| Иваело Кръстев | [Ivaelo](https://github.com/Ivaelo) | | |
|12| Ивайло Димов | [IvailoDimov](https://github.com/IvailoDimov) | | |
|12| Ивайло Димов | [IvailoDimov](https://github.com/IvailoDimov) 🍬| | |
|13| Ивайло Генчев | [Squidfishrl](https://github.com/Squidfishrl) | | |
|14| Иван Станчев | [IvanStanchev](https://github.com/IvanStanchev) | 🍬 | |
|15| Йордан Христов | [dachkata555](https://github.com/dachkata555) | | |
Expand Down
17 changes: 17 additions & 0 deletions hw2
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
def fib(i):
if i == 2:
return i
return fib(i-1) + fib(i-2)


def num_ways(N):
if N <= 1:
return "ERROR"
if N > 2
return "ERROR"
if N == 2:
return N
return fib(N)


print(num_ways(3))