-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvpw_test_python.py
36 lines (31 loc) · 1.05 KB
/
vpw_test_python.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
"""Opgave omtrek"""
"""Author: Philippe Asselbergh Lars Veelaert Jonas Van Reeth"""
"""Date:30/01/2016"""
"""Aantal testgevallen"""
n = int(raw_input())
"""Getallen inlezen"""
for j in range(n+1):
"""Aantal vluchten in testgeval"""
aantalVluchten = int(raw_input())
ts = [[0 for x in range(4)] for x in range(aantalRechthoek)]
for i in range(aantalRechthoek):
rechthoek=raw_input()
ts[i] = rechthoek.split( )
x = xComponentRechthoek(ts)
y = yComponentRechthoek(ts)
num_list = [[0 for z in range(y)] for z in range(x)]
for i in range(aantalRechthoek):
for j in range(int(ts[i][0]),int(ts[i][0])+int(ts[i][2])):
for k in range(int(ts[i][1]),int(ts[i][1])+int(ts[i][3])):
num_list[j][k] = 1
"""bereken omtrek"""
om = berekenOmtrek(num_list)
"""bereken oppervlakte"""
op = oppervlakte(num_list)
"""omtrek"""
out1.append(om)
"""oppervlakte"""
out2.append(op)
for x in range(n+1):
"""nummer _ oppervlakte _ omtrek"""
print x+1, out2[x] , out1[x]