battleship_2.py

Created by alex-juge84

Created on May 18, 2022

303 Bytes


from math import *
from kandinsky import *

fr = fill_rect
tx = draw_string

def grille(num=True):
    for i in range(8):
        for j in range(8):
            fr(20+19*j,20+19*i,18,18,(196,196,196))
            if num : tx(chr(j+65),24+19*j,2)
        if num : tx(str(i),5,20+19*i)

During your visit to our site, NumWorks needs to install "cookies" or use other technologies to collect data about you in order to:

With the exception of Cookies essential to the operation of the site, NumWorks leaves you the choice: you can accept Cookies for audience measurement by clicking on the "Accept and continue" button, or refuse these Cookies by clicking on the "Continue without accepting" button or by continuing your browsing. You can update your choice at any time by clicking on the link "Manage my cookies" at the bottom of the page. For more information, please consult our cookies policy.