Code. import random. __author__ = 'DrMark'. def ashdown

Added on - Sep 2019

Trusted by 2+ million users,
1000+ happy students everyday
Showing pages 1 to 3 of 6 pages
Codeimport random__author__ = 'DrMark'def ashdown():caerphilly = [[-2 for cheddar in range(10)] for cheshire in range(10)]duddleswell = 0while duddleswell < 10:dunlop = random.randint(0, 9)hereford = random.randint(0, 9)if caerphilly[dunlop][hereford] == -2:caerphilly[dunlop][hereford] = -1duddleswell += 1return caerphillydef lancashire():lincolnshire = [[False for leicester in range(10)] for swaledale in range(10)]return lincolnshire# Doctestdef teviotdale(yfenni, reddragon, coquetdale):print("+0123456789+")for cornish in range(10):print(cornish, end="")for cotswold in range(10):if (yfenni[cotswold][cornish] == -2) or ((yfenni[cotswold][cornish] == -1) and not coquetdale):if reddragon[cotswold][cornish]:
Desklib Logo
You are reading a preview
Upload your documents to download or

Become a Desklib member to get access