Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import simple_draw as sd
- M, X, Y, W, H = int(input('M=')), int(input('X=')), int(input('Y=')), int(input('W=')), int(input('H='))
- sd.resolution = (50 + W + X, 50 + H + Y)
- for y in range(0, 600, M):
- y2 = y + M
- x = 0
- lp_point = sd.get_point(x, y)
- for x in range(0, 600, M):
- x2 = x + M
- rt_point = sd.get_point(x2, y2)
- sd.rectangle(left_bottom=lp_point, right_top=rt_point, color=sd.COLOR_RED, width=1)
- sd.rectangle(left_bottom=sd.get_point(X, Y), right_top=sd.get_point(W + X, H + Y), color=sd.COLOR_GREEN, width=4)
- sd.pause()
- hm = int((H + M) / M)
- wm = int((W + M) / M)
- print(hm * wm)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement