Skip to content

Commit b3e787b

Browse files
committed
Advance task added
1 parent 972dff8 commit b3e787b

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

0x1C-makefiles/100-Makefile

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
CC = gcc
2+
SRC = main.c school.c
3+
OBJ = $(SRC:.c=.o)
4+
NAME = school
5+
CFLAGS = -Wall -Werror -Wextra -pedantic
6+
7+
.PHONY: all clean oclean fclean re
8+
9+
all: m.h $(OBJ)
10+
$(CC) $(OBJ) -o $(NAME)
11+
12+
clean:
13+
$(RM) *~ $(NAME)
14+
15+
oclean:
16+
$(RM) $(OBJ)
17+
18+
fclean: clean oclean
19+
20+
re: fclean all

0x1C-makefiles/5-main.py

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/python3
2+
"""
3+
5-main
4+
"""
5+
island_perimeter = __import__('5-island_perimeter').island_perimeter
6+
7+
if __name__ == "__main__":
8+
grid = [
9+
[0, 0, 0, 0, 0, 0],
10+
[0, 1, 0, 0, 0, 0],
11+
[0, 1, 0, 0, 0, 0],
12+
[0, 1, 1, 1, 0, 0],
13+
[0, 0, 0, 0, 0, 0]
14+
]
15+
print(island_perimeter(grid))

0 commit comments

Comments
 (0)