This commit is contained in:
thib8956 committed 2026-11-11 15:36:53 +01:00
1 parent 0232b9326d
commit 5c3fb89870
50 files changed
+97 -117

No files matched your search

+1 -3
View File
@@ -1,6 +1,5 @@
#!/usr/bin/env python3
import fileinput
from sys import argv
def area(a, b):
@@ -38,8 +37,7 @@ def generate_ppm(inp, scale=100):
with open("test.ppm", "w") as f:
f.write(f"P3\n{width} {height}\n255\n")
for row in arr:
for cell in row:
f.write(f"{cell * 255} 0 0 ")
f.writelines(f"{cell * 255} 0 0 " for cell in row)
f.write("\n")
print("PPM file written to test.ppm")