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

Added on - 18 Sep 2019

  • 6

    pages

  • 990

    words

  • 102

    views

  • 0

    downloads

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
card-image

To View Complete Document

Become a Desklib Library Member.
Subscribe to our plans

Download This Document