PATTERNS IN PYTHON

Run Settings
LanguagePython
Language Version
Run Command
ROWS = 5 for i in range(1, ROWS + 1): print(" " * (ROWS - i) + "* " * i) ROWS = 5 for i in range(1, ROWS + 1): print(" " * (ROWS - i) + "* " * i) for i in range(ROWS - 1, 0, -1): print(" " *(ROWS - i) + "* " * i) ROWS = 8 COLS = 8 for i in range(ROWS): for j in range(COLS): if (i + j) % 2 == 0: # Gunakan '==' untuk perbandingan print("X", end=" ") else: print("0", end=" ") print() # Tambahkan newline setelah setiap baris
Editor Settings
Theme
Key bindings
Full width
Lines