Beh di cosa vi stupite, Python può farlo.
Il codice non è mio, ma non ricordo esattamente la fonte, ma insomma provatelo e ditemi se non è divertentissimo.
from collections import deque
import random
import shutil
from time import sleep
TERMINAL_WIDTH, TERMINAL_HEIGHT = shutil.get_terminal_size()
RAIN_DENSITY = 0.15
EMPTY_LINE = " " * TERMINAL_WIDTH
lines = deque([EMPTY_LINE for _ in range(TERMINAL_HEIGHT)], maxlen=TERMINAL_HEIGHT)
def build_next_line(source):
next_row = ["|" if char == "v" else " " for char in source]
for idx, _ in enumerate(next_row):
if random.random() < RAIN_DENSITY:
next_row[idx] = "v"
return "".join(next_row)
while True:
new_row = build_next_line(lines[0])
lines.appendleft(new_row)
for row in lines:
print(row)
sleep(0.05)