from random import choice
characters = ['.', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' ']
width = 100
height = 25
for y in range(height):
for x in range(width):
print(choice(characters), end='')
print('')
. . . . . . . . . . . . . . . . . . . . . .. . . . . . . . . . . . .. . . . . .. . . . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . .. . .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .. . . . . . . . .. . .. . . ... . . . . . . . . . . . . . . . .. . . . . . . .. . . . . . . . .. .. . ... . . .. . . . . . . . . .. . . . . . . .. . .. .. .. . . . .. . ... . . . . . . . . . . .. . . . .. . . . . . . . . . . . ..
! jp2a --help
jp2a 1.0.6 Copyright (C) 2006 Christian Stigen Larsen Distributed under the GNU General Public License (GPL) v2. Usage: jp2a [ options ] [ file(s) | URL(s) ] Convert files or URLs from JPEG format to ASCII. OPTIONS - Read images from standard input. --blue=N.N Set RGB to grayscale conversion weight, default is 0.1145 -b, --border Print a border around the output image. --chars=... Select character palette used to paint the image. Leftmost character corresponds to black pixel, right- most to white. Minimum two characters must be specified. --clear Clears screen before drawing each output image. --colors Use ANSI colors in output. -d, --debug Print additional debug information. --fill When used with --color and/or --html, color each character's background color. -x, --flipx Flip image in X direction. -y, --flipy Flip image in Y direction. -f, --term-fit Use the largest image dimension that fits in your terminal display with correct aspect ratio. --term-height Use terminal display height. --term-width Use terminal display width. -z, --term-zoom Use terminal display dimension for output. --grayscale Convert image to grayscale when using --html or --colors --green=N.N Set RGB to grayscale conversion weight, default is 0.5866 --height=N Set output height, calculate width from aspect ratio. -h, --help Print program help. --html Produce strict XHTML 1.0 output. --html-fill Same as --fill (will be phased out) --html-fontsize=N Set fontsize to N pt, default is 4. --html-no-bold Do not use bold characters with HTML output --html-raw Output raw HTML codes, i.e. without the <head> section etc. --html-title=... Set HTML output title -i, --invert Invert output image. Use if your display has a dark background. --background=dark These are just mnemonics whether to use --invert --background=light or not. If your console has light characters on a dark background, use --background=dark. --output=... Write output to file. --red=N.N Set RGB to grayscale conversion weight, default 0.2989f. --size=WxH Set output width and height. -v, --verbose Verbose output. -V, --version Print program version. --width=N Set output width, calculate height from ratio. The default mode is `jp2a --term-fit --background=dark'. See the man-page for jp2a for more detailed help text. Project homepage on http://jp2a.sf.net Report bugs to <csl@sublevel3.org>
! jp2a play.jpg --width=100
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMWMMMMMMMMMMMMMMMMMMMMWNMMNNWMMMMNWNNMMMMMMMMMMMMMMMMWMMMMMMMMWMMMMMMMMKNNWMMMMMMMMMMMMMMMMMMMM MMKdWWNXMMMxNWNNWNNONNNWNNNNWokWMNNXNNNMMWNXMMMMMMMMM0NNNNXNNNNoXWWKMMMMMMMdKMMNXMMM00NXWMMM00NNNMMM MM0oMMMNMMM;NMMMMMM;KXWMMMMXXKcMMxkMMMNXkkXMMMMMMMMMMcMMMMXNMMW:XMMNMMMMMMOkMMMMNXXONMMMNNNkXMMMXNMM MMXlMMMNMMMcXMX00KXNXkxMMMWXMM00KKoOXMWNNNNNMMMMMMMMMcMMMXNxxMW:0MMNMMMMMXdMMKlMMNox0MMMMMXMMMWXWMMM MMNcMMMNWWN,0MMXXNMMM0xMMMXWMMMMMMMKK00oWMMWNMMMMMMMMcMMMWWXWNXx0MMWWWWNXoWMMKcKMMNXKxxKMMMMMNNMMMMM MMMlMMMMMMM,0MMWWWNNM0kMMMXMMMMMMWdNNNNXMMMMXMMMMMMMMcMMMMXXNMMkkMMMMMMMcXMMMMMMMMMNNMMcMMMMMNMMMMMM MMMcMMWWWXN:kNXXXXXWMKd0KWXMMMMMMoOMMMMMMWNXMMMMMMMMMcMMMMXMMMMOxMWWWNXNlKMMNXXcXMNNNMMcNWWWMNMMMMMM MMMKXXKXXXNNXNMMMMMMMMMMX0WMMMMMMMKO0KKXNWMMMMMMMMMMMXKKKKNMMMMWKXXKXXXWMKk0NMMWONWMMMMNXKKXKWMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
img = '''MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMWMMMMMMMMMMMMMMMMMMMMWNMMNNWMMMMNWNNMMMMMMMMMMMMMMMMWMMMMMMMMWMMMMMMMMKNNWMMMMMMMMMMMMMMMMMMMM
MMKdWWNXMMMxNWNNWNNONNNWNNNNWokWMNNXNNNMMWNXMMMMMMMMM0NNNNXNNNNoXWWKMMMMMMMdKMMNXMMM00NXWMMM00NNNMMM
MM0oMMMNMMM;NMMMMMM;KXWMMMMXXKcMMxkMMMNXkkXMMMMMMMMMMcMMMMXNMMW:XMMNMMMMMMOkMMMMNXXONMMMNNNkXMMMXNMM
MMXlMMMNMMMcXMX00KXNXkxMMMWXMM00KKoOXMWNNNNNMMMMMMMMMcMMMXNxxMW:0MMNMMMMMXdMMKlMMNox0MMMMMXMMMWXWMMM
MMNcMMMNWWN,0MMXXNMMM0xMMMXWMMMMMMMKK00oWMMWNMMMMMMMMcMMMWWXWNXx0MMWWWWNXoWMMKcKMMNXKxxKMMMMMNNMMMMM
MMMlMMMMMMM,0MMWWWNNM0kMMMXMMMMMMWdNNNNXMMMMXMMMMMMMMcMMMMXXNMMkkMMMMMMMcXMMMMMMMMMNNMMcMMMMMNMMMMMM
MMMcMMWWWXN:kNXXXXXWMKd0KWXMMMMMMoOMMMMMMWNXMMMMMMMMMcMMMMXMMMMOxMWWWNXNlKMMNXXcXMNNNMMcNWWWMNMMMMMM
MMMKXXKXXXNNXNMMMMMMMMMMX0WMMMMMMMKO0KKXNWMMMMMMMMMMMXKKKKNMMMMWKXXKXXXWMKk0NMMWONWMMMMNXKKXKWMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM'''
for line in img.split("\n"):
for letter in line:
if letter == "M":
img = img.replace(letter, " ")
else:
img = img.replace(letter, ".")
print(img)
. .. ... .... . . .... ...... ..................... ...... ... ............... .. .. ..... ..... .. . .. .... .... .. ..... . .. ... . .. ..... ..... .. .. . .. ......... .. ....... ...... . .... ... . .. .. .... . ... .. ...... ... .. .. ...... .. . ........ ........ ... ...... .. . .. ..... .. . ....... . . ... .. .. .. . . . .............. ...... .. ... . . .. ........ ..... ... ..... . ........... ... ........ ...... ......... .... .... .......
from random import choice
character_set = 'gamification '
characters = [character for character in character_set]
width = 100
height = 25
for y in range(height):
for x in range(width):
print(choice(characters), end='')
print('')
t t a t m a o c i oa t a a o a a a i nn c ii o g i a i t f g o g c c c a o a ot a a n i ai n ac f i a o m o i c i mn i a f g a f i ii i a o g n a g o c f a a c ac m n m i i i i i oi i a a i f m o i c t n i n f mi i m a i g a m gi mc cii m a m f f i i a i a n n t i c i of i i i i o i i a o g im ia c a g i t m o i i a i m a ao f ag m n i a n o ft mg ac a of a n f n o n i i om m t i f cf m a g m c g c ami i a i t nin o i mi g n m c i g o t i g m g m a i a i t c i ig f i ao t f in c tt n f gi c n g i g ifa i n o n fn ag c f i f m o m o o a mi i i i a
What other mini-games can we make?
You can restrict yourself to using ASCII characters only (see https://en.wikipedia.org/wiki/ASCII) and stay in touch with early computer graphics ASCII art...
Or you can extend your pallete with Unicode characters. This is a nice website that highlights specific character sets: http://xahlee.info/comp/unicode_index.html
pip install english-words
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting english-words
Downloading https://www.piwheels.org/simple/english-words/english_words-1.1.0-py3-none-any.whl (1.1 MB)
|████████████████████████████████| 1.1 MB 3.2 MB/s
Installing collected packages: english-words
Successfully installed english-words-1.1.0
WARNING: You are using pip version 21.3.1; however, version 22.0.3 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
Note: you may need to restart the kernel to use updated packages.
from english_words import english_words_set
'ghost' in english_words_set
True
word = english_words_set
'ghost' in word
True
word_b = ['knapsack',
'villein',
'windup',
'eidetic',
'Derek',
'rutile',
'expenditure',
'Michaelangelo',
'Schulz',
'jay',
'sandhill',
'slur',
'impregnate',
'azalea',
'Peugeot',
'capacitate',
'posey',
'villain',
'stopgap',
'jaunty',
'Hal',
'Shockley',
'edge',
'intrusion',
'pigpen',
'roundhead',
'Steve',
'Glaswegian',
'offload',
'Muncie',
'planet',
'Grimaldi',
'aria',
'feline',
'convivial',
'grass',
'have',
'strop',
'casteth',
'tarpaper',
'wigging',
'Palatine',
'areawide',
'negligible',
'tactile',
'Callahan',
'armload',
'trial',
'dreamboat',
'swivel',
'corkscrew',
'newscast',
'Abramson',
'morphemic',
'rot',
'Islamic',
'Jones',
'Kennan',
'enthusiast',
'therein',
'coldhearted',
'spectrograph',
'stingray',
'chestnut',
'stage',
'Linton',
'typic',
'approximant',
'Parkinson',
'Sibley',
'lockout',
'interdict',
'crackpot',
'obstruct',
'minimum',
'Ann',
'flyer',
'Charles',
'Utica',
'resignation',
'Maier',
'paradox',
'sprite',
'SST',
'Montenegrin',
'him',
'canna',
'bugging',
'whiteface',
'Philip',
'brute',
'estuarine',
'Mesopotamia',
'trifle',
'pulley',
'Farmington',
'finial',
'Bombay',
'hundredth',
"l's",
'detour',
'chickpea',
'sky',
'oath',
'Clausen',
'pyknotic',
'adherent',
'fierce',
'steeple',
'crush',
'woeful',
'traverse',
'titanate',
'Colombia',
'split',
'diem',
'Haugen',
'registration',
'Somalia',
'pelican',
'hoop',
'Klan',
'keto',
'Monticello',
'swami',
'foist',
'hast',
'woodside',
'cookie',
'polloi',
'slouch',
'suffrage',
'Clearwater',
'wheelbase',
'character',
'blowfish',
'Tanya',
'farina',
'bitt',
'nook',
'platelet',
'rob',
'Aarhus',
'altitude',
'zygote',
'organometallic',
'multitudinous',
'adenoma',
'paternoster',
'inter',
'gentlewomen',
'pierce',
'minuscule',
'eminent',
'mulct',
'turbinate',
'incurred',
'heir',
'inexpressible',
'somersault',
'paraxial',
'sorghum',
'placid',
'homily',
'potpourri',
'Nordstrom',
'Friday',
'postmodern',
'shawl',
'hummingbird',
'wattage',
'secure',
'fortran',
'hereinbelow',
'store',
'bombproof',
'natty',
'lawgiving',
'hexachloride',
'foursquare',
'language',
'Malton',
'strand',
'rut',
'pocketful',
'autochthonous',
'fell',
'geodesic',
'invert',
'hosiery',
'abrasion',
'porcelain',
'rifleman',
'Koch',
'compensatory',
'chairwomen',
'hound',
'Neptune',
'visceral',
'compute',
'kitchen',
'Riyadh',
'bum',
'demurring',
'illuminate',
'belief',
'term',
'Drummond',
'delirious',
'trek',
'archaism',
'bang',
'perseverant',
'hibachi',
'Richmond',
'dove',
'scuffle',
'maledict',
'childbearing',
'Oedipus',
'dominant',
'biennium',
'timeout',
'strange',
'chaplain',
'marshland',
'reclamation',
'myoglobin',
'Hrothgar',
'pianissimo',
'Ernest',
'Galloway',
'courage',
'greed',
'gavel',
'teapot',
'vale',
'retain',
'movie',
'sleight',
'typhoid',
'Werther',
'automate',
'Duncan',
'altern',
'inbred',
'Martinique',
'chalcocite',
'transferred',
'unity',
'bookie',
'mousy',
'gooseberry',
'baggage',
'dock',
'cytolysis',
'turntable',
'chickadee',
'paradoxic',
'exportation',
'patchwork',
'fibrin',
'exaltation',
'rowboat',
'Antietam',
'filch',
'brownie',
'universal',
'malarial',
'enstatite',
'ignite',
"wouldn't",
'shortcoming',
'librarian',
'Purina',
'scenario',
'blossom',
'infamy',
'funereal',
'certify',
'aloe',
'jittery',
'scandalous',
'fogy',
'hereof',
'filmstrip',
'spectrum',
'lexicon',
'totem',
'discriminate',
'island',
'proclamation',
'worktable',
'steeplechase',
'polariscope',
'closeup',
'incidental',
'Stanhope',
'draftsperson',
'stickleback',
'migratory',
'turk',
'seagull',
"they'd",
'provincial',
'Roy',
'Thursday',
'Durward',
'indefensible',
'count',
'Sanderson',
'Brahmsian',
'contrive',
'assent',
'Paulo',
'intoxicate',
'aerodynamic',
'orthodox',
'Suzanne',
'diphtheria',
'yam',
'Provence',
'gibberish',
'biddy',
'demurred',
'Pinsky',
'sulfurous',
'neutrino',
'scary',
'quietus',
'litigate',
'tangential',
'ethology',
'variate',
'who',
'brindle',
'bikini',
'folio',
'Dis',
'fizzle',
'journey',
'homotopy',
'sensuous',
'pastry',
'Bradshaw',
'Wylie',
'fright',
'quench',
'sweatband',
'inductor',
'search',
'deleterious',
'skittle',
'chanson',
"O'Hare",
'histidine',
'silicide',
'bromide',
'tragedy',
'benchmark',
'phase',
'dobson',
'crankshaft',
'fieldwork',
'aqua',
'mitt',
'ombudsperson',
'campus',
'peregrine',
'flip',
'sleazy',
'ipsilateral',
'pack',
'medicine',
'patrilineal',
'Johansen',
'crayon',
'onetime',
'villa',
'notion',
'cleavage',
'trunkful',
'laterite',
'gallberry',
'stratify',
'heterogeneous',
'backyard',
'Segundo',
'essay',
'seedy',
'Goldstein',
'Tiffany',
'curriculum',
'abort',
'dump',
'mature',
'connotation',
'drupe',
'cubicle',
'heptane',
'mailman',
'splutter',
'basket',
"v's",
'knockdown',
'h',
'mossy',
'glucose',
'newsboy',
'anomaly',
'close',
'milkweed',
'vitamin',
'woodhen',
'Yellowknife',
'Congo',
'Shelby',
'Fredrickson',
'narwhal',
'synapse',
'befog',
'phonograph',
'prune',
'sorority',
'expression',
'adenine',
'blast',
'inexpiable',
'symplectic',
'lookout',
'chapel',
'deadlock',
'ornamentation',
'insuppressible',
'paddock',
'beribbon',
'trailhead',
'dal',
'quintuplet',
'palazzi',
'collarbone',
'telephonic',
'boot',
'ninefold',
'stamina',
'basis',
'Gustafson',
'betray',
'swirly',
'McCallum',
'Sousa',
'fortune',
'Medici',
'remedy',
'doggone',
'antecedent',
'hove',
'extraterritorial',
'gibby',
'exposition',
'Scribners',
'Hadley',
'Burgundian',
'Statler',
'gadget',
'Parmesan',
'dairy',
'capybara',
'keyboard',
'swing',
'pure',
'irreproducible',
'shamrock',
'tamarind',
'megabit',
'swordplay',
'sandalwood',
'ferocity',
'cover',
'implicant',
'Dalton',
'phosphorylate',
'riddle',
'Otto',
'duke',
'honest',
'nervous',
'geyser',
'sincere',
'rusty',
'allowance',
'denial',
'raise',
'forsook',
'lifespan',
'adrift',
'grateful',
'Whippany',
'shenanigan',
'illimitable',
'haw',
'policewoman',
'emacs',
'wall',
'tern',
'cane',
'hardwire',
'essential',
'cavort',
'albacore',
'dense',
'marsupial',
'inharmonious',
'incommensurate',
'fate',
'hutch',
'Enoch',
'scaly',
'counterman',
"x's",
'Barlow',
'fret',
'depositor',
'allot',
'symbiosis',
'thirtieth',
'bait',
'Euphrates',
'found',
'programmable',
'quanta',
'chock',
'spree',
'pungent',
'skeleta',
'geese',
'evzone',
'gauze',
'microscopy',
'Bonneville',
'spray',
'hourglass',
'scrabble',
'shrift',
'refuge',
'pollock',
'Valparaiso',
'pavanne',
'manual',
'i.e',
'beman',
'employee',
'vault',
'cynic',
'gripe',
'almanac',
'shagging',
'decile',
'katydid',
'amity',
'feedback',
'malpractice',
'die',
'foothold',
'stipend',
'metallic',
'herself',
'ferroelectric',
'Charlie',
'choose',
'integrable',
'sonata',
'communicable',
'Navajo',
'makeup',
'floodlit',
'fractal',
'Lockheed',
'pay',
'firework',
'figurate',
'Rowena',
'Shiva',
'threshold',
'damask',
'Libreville',
'Taiwan',
'Onondaga',
'sicken',
'Haley',
'illicit',
'obsolete',
'hullaballoo',
'semper',
'nauseum',
'suffuse',
'play',
'impressible',
'demitted',
'carbonium',
'tumble',
'hob',
'Noah',
'Percy',
'efface',
'monte',
'Molly',
'torr',
'whale',
'whipsaw',
'Middlebury',
'size',
'perpetrate',
'watchmake',
'sputter',
'lusty',
'deoxyribose',
'jounce',
'Coriolanus',
'swift',
'McElroy',
'gabble',
'renovate',
'meaty',
'metropolitan',
'aniline',
"ain't",
'buret',
'snob',
'Gail',
'shard',
'shrugging',
'Bloomington',
'Gerber',
'spunky',
'trainload',
'reinforce',
'bordello',
'derision',
'piecemeal',
'dispel',
'dream',
'burley',
'longhorn',
'Bausch',
'thirteenth',
'forever',
'disparage',
'rift',
'confirm',
'squad',
'dodecahedron',
'transportation',
'resemble',
'voracity',
'shift',
'role',
'overt',
'carry',
'dispersible',
'susceptance',
"we'd",
'Rydberg',
'Travis',
"O'Sullivan",
'interpretive',
'requisite',
'neither',
'indiscriminate',
'inert',
'burdock',
'congressmen',
'EEOC',
'erosible',
'shrike',
'hung',
'cubbyhole',
'Hibbard',
'paucity',
'chin',
'treacherous',
'roundup',
'revulsion',
'consulate',
'UN',
'duration',
'ester',
'catechism',
'sod',
'sea',
'segment',
'Jesuit',
'prestidigitate',
'honorarium',
"O'Brien",
'such',
'midst',
'synergy',
'template',
"I'm",
'shoofly',
'lotus',
'instinct',
'dose',
'asperity',
'cabinetry',
'cathodic',
'client',
'long',
'radiotherapy',
'Maurine',
'test',
'nod',
'comprise',
'onerous',
'trapezoidal',
'clattery',
'excite',
'Gaines',
'Transvaal',
'aft',
'Muzak',
'brevity',
'scarface',
'mayapple',
'drawl',
'galena',
'southernmost',
'depose',
'rhodonite',
'teacart',
'clump',
'emergent',
'courtyard',
'marginalia',
'transom',
'landowner',
'apotheosis',
'ionosphere',
'Saskatchewan',
'incandescent',
'with',
'cultural',
'reactionary',
'Hardin',
'solenoid',
'haploidy',
'Richardson',
'Galveston',
'Descartes',
'recherche',
'Kalamazoo',
'originate',
'Lyra',
'chitinous',
'matron',
'expertise',
'supplicate',
'Sicilian',
'juggernaut',
'cloture',
'endemic',
'Portugal',
'bribery',
'gladden',
'screechy',
'anoint',
'follicular',
'Banach',
'mescal',
'Babcock',
'saturater',
'acceptant',
'applicate',
'investigate',
'rove',
'anarch',
'dextrose',
'Bengali',
'labia',
'millionth',
'salon',
'tissue',
'iconoclasm',
'than',
'Calkins',
'uphold',
'lever',
'expiate',
'mend',
'Martha',
'shiv',
'midge',
'futile',
'orgy',
'men',
'quarryman',
'connive',
'Greer',
'methionine',
'tramway',
'floodwater',
'imbalance',
'commissariat',
'nearby',
'hygiene',
'Constantine',
'enumerable',
'Augustus',
'stay',
'titmouse',
'Hamal',
'Jeremy',
'peptide',
'mercenary',
'dissociate',
'farm',
'paragon',
'retrieve',
'optima',
'taffeta',
'playboy',
'gardenia',
'absenteeism',
'bauxite',
'posthumous',
'pub',
'cowpunch',
'competition',
'Sandra',
'estimate',
'backstage',
'Lopez',
'Thule',
'decorate',
'fealty',
'hermaphrodite',
'perfume',
'cry',
'careful',
'winy',
'dormitory',
'Egyptology',
'duplicity',
'justiciable',
'portfolio',
'midland',
'Alcestis',
'newsmen',
'strobe',
'deceit',
'Bristol',
'berth',
'typhus',
'hereinabove',
'pinxter',
'son',
'operate',
'caddy',
'gallop',
'Alabama',
"aren't",
'antennae',
'Olsen',
'clogging',
'suction',
'merry',
'monotonous',
'gavotte',
'produce',
'turpitude',
'afraid',
'supervene',
'summate',
'Rutland',
'protactinium',
'riflemen',
'soapy',
'threaten',
'Moroccan',
'proportion',
'flowery',
'Disneyland',
'landau',
'porpoise',
'Bauhaus',
'diaper',
'hifalutin',
'amble',
'bureaucratic',
'Chicano',
'pilferage',
'nephew',
'eukaryote',
'sawyer',
'Fiberglas',
'oxen',
'implacable',
'dud',
'rangeland',
'fireboat',
'adventitious',
'Pusan',
'bigamy',
'Dusenberg',
'teach',
'Hobbes',
'statutory',
'inattention',
'podium',
'protector',
'mommy',
'Weierstrass',
'acrobacy',
'enhance',
'incongruity',
'win',
'offertory',
'politic',
'rainstorm',
'camelopard',
'problem',
'MacDougall',
'cognac',
'corvette',
'cannabis',
'Osaka',
'iodinate',
'contemplate',
'advert',
'pirouetting',
'foamy',
'Italy',
'roe',
'meal',
'wiseacre',
'rhinoceros',
'shallot',
'voltage',
'pater',
'lecture',
'switchback',
'apices',
'Colby',
'homeland',
'whatnot',
'rebel',
'McIntyre',
'assassin',
'whelm',
'Coronado',
'schelling',
'gummy',
'vacua',
'social',
'folic',
'iodide',
'Nate',
'Labrador',
'explore',
'cobalt',
'vampire',
'silt',
'Ares',
'crappie',
'Springfield',
'Nicodemus',
'occupation',
'these',
'figure',
'McKee',
'Moses',
'mousse',
'Pentecost',
'sorrel',
'Chaucer',
'bronchiolar',
'tablespoonful',
'triangular',
'colloidal',
'cannibal',
'McMullen',
'septum',
'seduction',
'bothersome',
'disparate',
'superior',
'heartthrob',
'Recife',
'deportee',
'expository',
'illegible',
'xenophobia',
'extramural',
'intermittent',
'mortgage',
'sworn',
'gratify',
'deconvolution',
'atheist']
a = choice(word_b)
x1 = 'b'
x2 = 'm'
x3 = 'p'
from random import choice
if x1 in a:
print(a + ' '+ 'false')
if x2 in a:
print(a + ' '+ 'false')
if x3 in a:
print(a + ' '+ 'false')
else:
print(a + ' '+ 'true')
knapsack false