feat: Initial commit
This commit is contained in:
19
scacchi.py
Normal file
19
scacchi.py
Normal file
@@ -0,0 +1,19 @@
|
||||
while True:
|
||||
casella = input("Inserire casella es g15")
|
||||
|
||||
lettera = casella[0]
|
||||
numero = int(casella[1])
|
||||
|
||||
if lettera in "abcdefgh" and 0 <= numero <= 8:
|
||||
break
|
||||
|
||||
if lettera in "aceg":
|
||||
if numero % 2 == 0:
|
||||
print("Bianco")
|
||||
else:
|
||||
print("Nero")
|
||||
else:
|
||||
if numero % 2 == 1:
|
||||
print("Bianco")
|
||||
else:
|
||||
print("Nero")
|
||||
Reference in New Issue
Block a user