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

Added on - 18 Sep 2019

  • 6

    Pages

  • 990

    Words

  • 142

    Views

  • 0

    Downloads

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’re reading a preview
Preview Documents

To View Complete Document

Click the button to download
Subscribe to our plans

Download This Document