example_003   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 12
dl 0
loc 17
rs 10
c 0
b 0
f 0
wmc 5

3 Functions

Rating   Name   Duplication   Size   Complexity  
A start() 0 2 1
A update() 0 3 1
A draw_pattern() 0 4 3
1
from pypen import *
2
3
4
def start():
5
    settings.fps = 5
6
7
8
def update():
9
    fill_screen("#E33050")
10
    draw_pattern()
11
12
13
def draw_pattern():
14
    for x, y in grid(spacing=10):
15
        if random() > 0.5:
16
            rectangle(x, y, 8, 8, "#F34060")
17