top of page
ToucanSway


PYTHON CODING
import numpy as np import matplotlib.pyplot as plt n = 5000 theta = np.linspace(0, 12 * np.pi, n) r = np.linspace(0, 1, n) + 0.2 *...

waclaw_koscielniak
Jul 91 min read
Â
Â
Â


PYTHON CODING
def g(): yield 1 yield 2 x = g() print(next(x)) print(next(x)) print(next(x)) [Running] python3 -u "/Users/name/test/test47.py" 1 2...

waclaw_koscielniak
Jul 91 min read
Â
Â
Â


PYTHON CODING
def string_only(f): def wrap(x): return f(x) if isinstance(x, str) else "Invalid" return wrap @string_only def echo(s): return s + s...

waclaw_koscielniak
Jul 81 min read
Â
Â
Â


PYTHON CODING
def pack(f): def wrap(x): return (f(x), x) return wrap @pack def square(x): return x ** 2 print(square(3)[1]) [Running] python3 -u...

waclaw_koscielniak
Jul 71 min read
Â
Â
Â


PYTHON CODE
def outer(): funcs = [] for i in range(3): def inner(i=i): return i * 2 funcs.append(inner) return funcs a, b, c = outer()...

waclaw_koscielniak
Jul 31 min read
Â
Â
Â
bottom of page