Why won't my code run? - python
Ascii credits - http://www.chris.com/ascii
The code won't run in pyscripter for some reason only showing two chevron prompts please help me out? Thanks. Also if you think you find any problems(bugs) etc. with the code. feel free to correct me or correct it yourself,thanks.
import random
import time
playagain = True
def intro():
print('You and your brave behind stare at the large dark forest infront of you.')
time.sleep(2)
print()
print('Instead of ignoring the darkness and spookiness of the forest you decide to enter anyways.')
time.sleep(2)
print()
print('You do not worry because you are a brave archer heralding a bow with deadly tipped arrows.')
print()
print('What is your name brave Archer')
print()
choice = input()
print('That is a name which brings fear, ' + choice)
print()
def monsters():
monster = ['''oo88888888boo
`""88888888888bo
""888; `"Y888o
Y88; "Y88.
"88. `88b. ,
`Yb `888. :8b
Yb , `888. 88b
Y. ` `"88. Y8"8.
Y. `. b ``8b :8 Y8.
,oooooooo Yo :.`b`b`8; 8 8b
,ood8P""""""""88888oo 8b Y.:b:b:8;,8 ,:8.
,od88888bo ` ,o. """888o`8b`8 Y.8.88d8 : 8;
"""""""""""8oo`,. 'oo. ""888b8b:8db8888 d :8 :;
d8888boP , "Y88o. ""Y8888888888 8 d8.88
o""""888888o``o'"88bood8888888888:8,;8888
o" ""8888888o."88888888" oooo `888d888:8
d' ,o8888888P88od88P""' ,d8888; Y888888:8
,8' ood88888,dP"88 :888888 :88888;d;
8' ,o88""8888`8P `" 888888P 8888d;8;
d;,o8P" ,d888'oP' "8888" d88888boo
8,88' ,8888'88 `' ,o8; "" Y88888888oooo.
:88' ,8888'dP,88o :; d88P oooo88d888888888bo.
`" ,8888;,;:88888. d8. :8P' ""' :8888888888ooo
,88888 8,88. :88; 88; ood" 88888888888P"Y;
oP d88;d;d888od"Y8 8; "" :8P""Y88PYb8 :
:P'd888`8'8b ""Y88. 8' `" `8" YP 8
,P .:Y8Pd8,8Y88o. :; `" o8 d;
,8'','8888;:8o """Y8 ooood88888oooo. o dP
8P ,d88'8;:8"888oooo8; ,o888888888888888888boo `Y8oo. dP
:8bd88888 8':8ooo. ""Yb odP"" """888888888bo8P""'o8"
"""""8888 8 :8888888o. 8oooo888oooooooooo. Y8888888888oo8"
d8888 Y :bo `""""888P""" ""Ybo. `"8888888""
,8`Y88.: :8"Y88oooooooo88. `Ybo Y8"
dP'd88;:; 8o `""Y8b `"b. dP
88`8:8;:; 88888booooood888. `8. 8'
:8P:'Y88:b 8P `8b `8d8'
88 ',88888 Y8888ooooooP""""Yb `"
,8; o8888bY;8Yb ' ooo88b
:8o8":;888'8;88bo,od8` '`'`' Ybo
d8" d;888bP;o'` ,.:o:'`"P o
"' 8'8888d8b,;odP8;dP'` o:;`'8 :o '
8 :8P8'88o`8P'' ooo' ,oo" d8.dboo
,8 :`d88b,88od8888P"' oo"" ,'" dP"88888
:P 88888;8b 888; oo8"' ,P' ,8' d'88"8
d;,dY88888.Y. Y8888"" odP' ,d" ,d'dP ,P
8bP' Y8Y888d8o `Y8; ood8P' ,dP o8':P :;
,P" :8YY;88b"b Y8888P" o'" o8P ,P 8 -hrr-
`8d:`888b`bo `8b ,o8" ,dP' ,P :;
8;:dP88888Yb Y888; d8; ,P 8
8;:8 :8888b88. `Y8boo8P' ,P :;
8b8' `88:;Y88"b. `Y888 ,P 8
88' Y88':88b."8o `"8b.oP 8'
"' :8Y :88888o"8o :88o. ,8'
8: 88;8Y88b88bod8"Y8oo8P
8.d':b8`8:P`"8888o. :8P
88' Yd 88' `"88888"
:8' `8 dP """'
`' 8o8
88''', ''' ___
`-._~-. / /_ "~o\ :Y
\ \ / : \~x. ` ')
] Y / | Y< ~-.__j
/ ! _.--~T : l l< /.-~
/ / ____.--~ . ` l /~\ \<|Y
/ / .-~~" /| . ',-~\ \L|
/ / / .^ \ Y~Y \.^>/l_ "--'
/ Y .-"( . l__ j_j l_/ /~_.-~ .
Y l / \ ) ~~~." / `/"~ / \.__/l_
| \ _.-" ~-{__ l : l._Z~-.___.--~
| ~---~ / ~~"---\_ ' __[>
l . _.^ ___ _>-y~
\ \ . .-~ .-~ ~>--" /
\ ~---" / ./ _.-'
"-.,_____.,_ _.--~\ _.-~
~~ ( _}
`. ~(
) \
/,`--'~\--''' , '''
_ ___ /^^\ /^\ /^^\_
_ _#)#) \ ,,/ '` ~ `'~~ ', `\.
_/o\_ _ _ _/~`.`...'~\ ./~~..,'`','',.,' ' ~:
/ `,'.~,~.~ . , . , ~|, ,/ .,' , ,. .. ,,. `, ~\_
( ' _' _ '_` _ ' . , `\_/ .' ..' ' ` ` `.. `, \_
~V~ V~ V~ V~ ~\ ` ' . ' , ' .,.,''`.,.''`.,.``. ', \_
_/\ /\ /\ /\_/, . ' , `_/~\_ .' .,. ,, , _/~\_ `. `. '., \_
< ~ ~ '~`'~'`, ., . `_: ::: \_ ' `_/ ::: \_ `.,' . ', \_
\ ' `_ '`_ _ ',/ _::_::_ \ _ _/ _::_::_ \ `.,'.,`., \-,-,-,_,_,
`'~~ `'~~ `'~~ `'~~ \(_)(_)(_)/ `~~' \(_)(_)(_)/ ~'`\_.._,._,'_;_;_;_;_; '''
, ''' |\___/|
(,\ /,)\
/ / \
(#_^_#)/ \
W//W_/ \
(//) | \
(/ /) _|_ / ) \
(// /) '/,_ _ _/ (~^-.
(( // )) ,-{ _ `.
(( /// )) '/\ / |
(( ///)) `. { }
((/ )) .----~-.\ \-'
///.----..> \
///-._ _ _ _} '''
, '''
/ o o \
/ \ / \
/ )-"-( \
/ ( 6 6 ) \
/ \ " / \
/ )=( \
/ o .--"-"--. o \
/ I / - - \ I \
.--( (_}y/\ /\y{_) )--.
( ".___l\/__\_____/__\/l___," )
\ /
"-._ o O o O o O o _,-"
`--Y--.___________.--Y--'
|==.___________.==| ''']
print('You walk through the forest slowly...')
time.sleep(2)
print('You hear a crack as if a twig broke..')
time.sleep(2)
print('The creature leaps out from the shadows!')
time.sleep(5)
print()
print(random.choice(monster))
print('You must engage the creature!')
def battle():
attack = [poison, fire, lightning, ice, greatbow]
gold = [1,2,3]
print('You ready your bow as you choose which tipped arrow to use embued with magic..')
time.sleep(2)
print('You strung your bow with the ' + random.choice(attack) + ' arrow')
time.sleep(3)
print('You take down the foe as he slowly tumbles to the ground!')
time.sleep(2)
print('The bigger they are the harder they fall')
time.sleep(3)
print('Would you like to enter deeper into the forest or flee while you can, you collected ' + gold + ' gold stacks this time around')
playagain = input()
while playagain == 'yes':
return intro
return monsters
return battle
else: exit()
Make a list into string or some data type according to your need. For-example
attack = ["poison", "fire", "lightning", "ice", "greatbow"]
Secondly change the int gold to str in this line given below:
print('Would you like to enter deeper into the forest or flee while you can, you collected ' + str(gold) + ' gold stacks this time around')
I am using python2.7 , change also 'yes' into "yes"
playagain = raw_input('Choose a number')
while playagain == "yes":
return intro
return monsters
return battle
else: exit()
if __name__ == "__main__":
battle()
I don't know which one of method you want to call but I called battle() method and it run fine.
Right first of all change all the input to raw_input. Also I guess the idea is to start from the intro function, then move to the monsters function and then to the battle function. Although you have defined them fine, you do not call them anywhere. What you could do for example is call the monsters function from the intro function, and then the battle function from the monsters function similarly
Related
How do i do unit tests in python?
I have a simple program for traslating morse code back and forth as a school project and part of it is also writting unit tests. I ve tried for multiple hours but was not succesful at all dictionary={'A':'.-', 'B':'-...', 'C':'-.-.', 'D':'-..', 'E':'.','F':'..-.', 'G':'--.', 'H':'....', 'I':'..', 'J':'.---', 'K':'-.-','L':'.-..', 'M':'--', 'N':'-.', 'O':'---', 'P':'.--.', 'Q':'--.-','R':'.-.', 'S':'...', 'T':'-', 'U':'..-', 'V':'...-', 'W':'.--','X':'-..-', 'Y':'-.--', 'Z':'--..'} dictionary2={'.-':'A','-...':'B','-.-.':'C','-..':'D', '.':'E','..-.':'F','--.':'G','....':'H', '..':'I','.---':'J', '-.-':'K','.-..':'L', '--':'M', '-.':'N', '---':'O', '.--.':'P', '--.-':'Q','.-.':'R', '...':'S', '-':'T', '..-':'U', '...-':'V', '.--':'W','-..-':'X', '-.--':'Y', '--..':'Z', '':' '} def coding(s): void="" for i in s: #indexing if i != ' ': void+=dictionary[i]+' ' else: void +=' ' print(void) def decoding(s): void = "" splitstring=s.split(" ") splitstring = s.split(" ")#splitting by spaces #splitstring=splitstring.remove('') for i in splitstring: #indexing void += dictionary2[i] print(void) def selection(f): f=int(input("1. Z ČEŠTINY DO MORSEOVKY || 2. Z MORESOVKY DO ČEŠTINY ")) # menu return f c = 1 d = 0 while(c!="0"): d =selection(d) a=input("ZADEJ TEXT NA ŠIFROVÁNÍ: ") a=a.upper() startUp="" # not being used but program cant be ran without it for some reason if d==1: # translating to morse code coding(a) else: # translating from morse code decoding(a) c = input(("POKUD CHCTE PROGRAM UKONČIT, ZADEJTE 0 || PRO POKRAČOVÁNÍ ZADEJTE LIBOVOLNÝ ZNAK : ")) this is what i ve tried: import pytest from example import coding from example import decoding def test_coding(): assert coding('HELLO') == '.... . .-.. .-.. --- ' assert coding('WORLD') == '.-- .-. .. -. ..-. ' assert coding('HELLO WORLD') == '.... . .-.. .-.. --- .-- .-. .. -. ..-. ' test_coding() #To write unit tests for the decoding() function, we can test that it decodes strings correctly by comparing the output of the function with the expected result. For example: def test_decoding(): assert decoding('.... . .-.. .-.. --- ') == 'HELLO' assert decoding('.-- .-. .. -. ..-. ') == 'WORLD' assert decoding('.... . .-.. .-.. --- .-- .-. .. -. ..-. ') == 'HELLO WORLD' test_decoding() My teacher wants those tests to be ran with this command: py.exe -m pytest --cov=. --cov-fail-under=66 in command block, it has to reach at least 66% success rate. thus far i ve always ended up with this result: =========================================================================================================== test session starts ============================================================================================================ platform win32 -- Python 3.9.6, pytest-7.2.0, pluggy-1.0.0 rootdir: C:\Users\ash31\OneDrive\Plocha\AP1VS-final-project plugins: cov-4.0.0 collected 0 items / 1 error ================================================================================================================== ERRORS ================================================================================================================== _____________________________________________________________________________________________________ ERROR collecting example_test.py _____________________________________________________________________________________________________ example_test.py:1: in <module> from example import coding example.py:51: in <module> d =selection(d) example.py:43: in selection f=int(input("1. Z ČEŠTINY DO MORSEOVKY || 2. Z MORESOVKY DO ČEŠTINY ")) # menu ..\..\..\AppData\Local\Programs\Python\Python39\lib\site-packages\_pytest\capture.py:192: in read raise OSError( E OSError: pytest: reading from stdin while output is captured! Consider using `-s`. ------------------------------------------------------------------------------------------------------------- Captured stdout -------------------------------------------------------------------------------------------------------------- 1. Z ČEŠTINY DO MORSEOVKY || 2. Z MORESOVKY DO ČEŠTINY ----------- coverage: platform win32, python 3.9.6-final-0 ----------- Name Stmts Miss Cover ------------------------------------- example.py 32 22 31% example_test.py 24 23 4% ------------------------------------- TOTAL 56 45 20% FAIL Required test coverage of 66% not reached. Total coverage: 19.64% ========================================================================================================= short test summary info ========================================================================================================== ERROR example_test.py - OSError: pytest: reading from stdin while output is captured! Consider using `-s`. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ============================================================================================================= 1 error in 0.46s =============================================================================================================
Trouble answering a python syntax challenge
I received this challenge where if I run the code right, a flag should appear. A little disclaimer, my Python skills are rough to non-existent and I'll be glad to understand what is causing the syntax errors in the code, specifically when trying to run the line 15 "31/21" seems to cause the problem, but here's the code: str = ''' _____ _ _____ _ / __ \ | | |_ _| | | | / \/_ _| |__ ___ _ __ | | ___ _ __ __ _ ___| | | | | | | | '_ \ / _ \ '__| | |/ __| '__/ _` |/ _ \ | | \__/\ |_| | |_) | __/ | _| |\__ \ | | (_| | __/ | \____/\__, |_.__/ \___|_| \___/___/_| \__,_|\___|_| __/ | |___/ ''' print(str) print("Congratulations on Completing Your Challenge!\n") print("Please send your CV, the code "31/21" and your registered email to the challenge via our Email address: cyberm#cyber.gov.il\n") input("Stay safe ;)") Thanks in advance.
When you want a " character in a string you can use the single quote ' to delimit the whole string: print('Please send your CV, the code "31/21" and your registered email to the challenge via our Email address: cyberm#cyber.gov.il\n')
Is there a way I can print the output of an input I converted on a singular line?
I was making this emoji encoder and basically I need to make it so that it prints the output of the inputted text on one line instead of each character on separate lines. Right Now it just inputs the encoded text(the emojis) on separate lines, is there any way I can make it output on just one line. Any suggestions? Edit: I solved the problem thanks everyone :) import emoji # Ascii Art print('\n' ' ________ __ ________ __ \n' '/ | / | / | / | \n' '$$$$$$$$/ _____ ____ ______ __ $$/ $$$$$$$$/ _______ _______ ______ ____$$ | ______ ______ \n' '$$ |__ / \/ \ / \ / |/ | $$ |__ / \ / | / \ / $$ | / \ / \ \n' '$$ | $$$$$$ $$$$ |/$$$$$$ | $$/ $$ | $$ | $$$$$$$ |/$$$$$$$/ /$$$$$$ |/$$$$$$$ |/$$$$$$ |/$$$$$$ |\n' '$$$$$/ $$ | $$ | $$ |$$ | $$ | / |$$ | $$$$$/ $$ | $$ |$$ | $$ | $$ |$$ | $$ |$$ $$ |$$ | $$/ \n' '$$ |_____ $$ | $$ | $$ |$$ \__$$ | $$ |$$ | $$ |_____ $$ | $$ |$$ \_____ $$ \__$$ |$$ \__$$ |$$$$$$$$/ $$ | \n' '$$ |$$ | $$ | $$ |$$ $$/ $$ |$$ | $$ |$$ | $$ |$$ |$$ $$/ $$ $$ |$$ |$$ | \n' '$$$$$$$$/ $$/ $$/ $$/ $$$$$$/__ $$ |$$/ $$$$$$$$/ $$/ $$/ $$$$$$$/ $$$$$$/ $$$$$$$/ $$$$$$$/ $$/ \n' ' / \__$$ | \n' ' $$ $$/ \n' ' $$$$$$/ \n' ' \n' '\n') # Intro Loading Screen print("Enter text to be encoded Here:") text = input() # Encoder for lower case if "a" in text: print(emoji.emojize(':grinning_face:')) if "b" in text: print(emoji.emojize(':grinning_face_with_smiling_eyes:')) if "c" in text: print(emoji.emojize(':beaming_face_with_smiling_eyes:')) if "d" in text: print(emoji.emojize(':grinning_squinting_face:')) if "e" in text: print(emoji.emojize(':grinning_face_with_sweat:')) if "f" in text: print(emoji.emojize(':rolling_on_the_floor_laughing:')) if "g" in text: print(emoji.emojize(':face_with_tears_of_joy:')) if "h" in text: print(emoji.emojize(':slightly_smiling_face:')) if "i" in text: print(emoji.emojize(':upside-down_face:')) if "j" in text: print(emoji.emojize(':winking_face:')) if "k" in text: print(emoji.emojize(':smiling_face_with_smiling_eyes:')) if "l" in text: print(emoji.emojize(':smiling_face_with_halo:')) if "m" in text: print(emoji.emojize(':smiling_face_with_hearts:')) if "n" in text: print(emoji.emojize(':smiling_face_with_heart-eyes:')) if "o" in text: print(emoji.emojize(':star-struck:')) if "p" in text: print(emoji.emojize(':face_blowing_a_kiss:')) if "q" in text: print(emoji.emojize(':kissing_face:')) if "r" in text: print(emoji.emojize(':grinning_face:')) if "s" in text: print(emoji.emojize(':smiling_face:')) if "t" in text: print(emoji.emojize(':kissing_face_with_closed_eyes:')) if "u" in text: print(emoji.emojize(':kissing_face_with_smiling_eyes:')) if "v" in text: print(emoji.emojize(':face_savoring_food:')) if "w" in text: print(emoji.emojize(':face_with_tongue:')) if "x" in text: print(emoji.emojize(':winking_face_with_tongue:')) if "y" in text: print(emoji.emojize(':squinting_face_with_tongue:')) if "z" in text: print(emoji.emojize(':money-mouth_face:'))
Put your letter: emoji mapping into a dict: emoji_map = { "a": ':grinning_face:', "b": ':grinning_face_with_smiling_eyes:', # etc } and then you can easily reformat your output, add new mappings, etc without having to change a bunch of individual if statements. For example, to put everything on one line: print("Enter text to be encoded Here:") text = input() print(''.join(emoji_map.get(c.lower(), '') for c in text))
The print() function always prints on a new line. You want to create a variable to take in all of the emojis, then print only once. If you are dealing with strings, for example, append to the strings. emojis_to_output = '' if "a" in text: emojis_to_output += emoji.emojize(':grinning_face:') # ... and so on ... if "z" in text: emojis_to_output += emoji.emojize(':money-mouth_face:') print(emojis_to_output)
A thing that I haven't seen any answers say is the print function's end argument: print(*objects, sep=' ', end='\n', file=sys.stdout, flush=False) Print objects to the text stream file, separated by sep and followed by end. sep, end, file and flush, if present, must be given as keyword arguments. So, for each of your print statements, you could do this: print(emoji.emojize(':grinning_face:'), end="") However, you are doing a lot - and I mean a lot - of unnecessary hard coding. Instead of having 26 if statements, just make a dictionary with all your values! emojis = { "a": ":grinning_face:", "b": ":grinning_face_with_smiling_eyes:", # ... and on and on ... } for key in emojis: if key in text: print(emoji.emojize(emojis[key]), end="") print() # Add a final new line Or, you could even make this a one-liner! print("".join(key in text and emoji.emojize(emojis.get(key)) for key in emojis))
A compass for a textadventure
I am trying to program an ascii compass for a text adventure. I found something like I want to do at this url: https://codereview.stackexchange.com/questions/207997/map-generator-for-a-text-based-role-playing-game I did this modification for me: north = "The Hills" west = "A realy dark room" #west = "A longer text destroy the positions" east = "Entrance to the Dungeon" south = "[X]" n = "N" s = "S" vert_line = "║" hzt_line = " ⯇ W ══ (C) ══ E ⯈ " print(north.center(72, " ")) print(r"▲".rjust(len(west)+10)) print(r""+n.rjust(len(west)+10)) print(r""+vert_line.rjust(len(west)+10)) print(r""+vert_line.rjust(len(west)+10)) print(west.rjust(len(east)) + hzt_line + east) print(r""+vert_line.rjust(len(west)+10)) print(r""+vert_line.rjust(len(west)+10)) print(r""+s.rjust(len(west)+10)) print(r"▼".rjust(len(west)+10)) print(south.center(len(west)+len(hzt_line)+len(east)-5, " ")) The problem is the calculation of the correct whitespace for the labels. It depends on the length of the text and breaks out of the center. I'm also stuck at the calculation for the whitespace .. the result should be like this: This is up ▲ N | To the left ◀ W ── [C] ── E ⯈ Dining Room | S ▼ Kitchen The code looks also really ugly, maybe anyone knows a smarter solution. Thank you very much for help! Rufnex
I ran into a problem playing with your code. For some reason the left arrow graphic messes up the centering. When I changed the character, this worked well: north = "The Hills" west = "A realy dark room" east = "Entrance to the Dungeon" south = "[X]" n = "N" s = "S" vert_line = "║" #hzt_line = " ⯇ W ══ (C) ══ E ⯈ " # for some reason the left arrow graphic messes up the centering hzt_line = " < W == (C) == E > " # synchronize east/west lengths and get line length labelsize= max(len(west),len(east)) westpad = west.rjust(labelsize) eastpad = east.ljust(labelsize) long_line = westpad+hzt_line+eastpad line_length = len(long_line) # print compass print(north.center(line_length)) print(r"▲".center(line_length)) print(n.center(line_length)) print(vert_line.center(line_length)) print(vert_line.center(line_length)) print(long_line.center(line_length)) print(vert_line.center(line_length)) print(vert_line.center(line_length)) print(s.center(line_length)) print(r"▼".center(line_length)) print(south.center(line_length))
decompress name
what is the easiest way to decompress a data name? For example, change compressed form: abc[3:0] into decompressed form: abc[3] abc[2] abc[1] abc[0] preferable 1 liner :)
In Perl: #!perl -w use strict; use 5.010; my #abc = qw/ a b c d /; say join( " ", reverse #abc[0..3] ); Or if you wanted them into separate variables: my( $abc3, $abc2, $abc1, $abc0 ) = reverse #abc[0..3]; Edit: Per your clarification: my $str = "abc[3:0]"; $str =~ /(abc)\[(\d+):(\d+)\]/; my $base = $1; my $from = ( $2 < $3 ? $2 : $3 ); my $to = ( $2 > $3 ? $2 : $3 ); my #strs; foreach my $num ( $from .. $to ) { push #strs, $base . '[' . $num . ']'; }
This is a little pyparsing exercise that I've done in the past, adapted to your example (also supports multiple ranges and unpaired indexes, all separated by commas - see the last test case): from pyparsing import (Suppress, Word, alphas, alphanums, nums, delimitedList, Combine, Optional, Group) LBRACK,RBRACK,COLON = map(Suppress,"[]:") ident = Word(alphas+"_", alphanums+"_") integer = Combine(Optional('-') + Word(nums)) integer.setParseAction(lambda t : int(t[0])) intrange = Group(integer + COLON + integer) rangedIdent = ident("name") + LBRACK + delimitedList(intrange|integer)("indexes") + RBRACK def expandIndexes(t): ret = [] for ind in t.indexes: if isinstance(ind,int): ret.append("%s[%d]" % (t.name, ind)) else: offset = (-1,1)[ind[0] < ind[1]] ret.extend( "%s[%d]" % (t.name, i) for i in range(ind[0],ind[1]+offset,offset) ) return ret rangedIdent.setParseAction(expandIndexes) print rangedIdent.parseString("abc[0:3]") print rangedIdent.parseString("abc[3:0]") print rangedIdent.parseString("abc[0:3,7,14:16,24:20]") Prints: ['abc[0]', 'abc[1]', 'abc[2]', 'abc[3]'] ['abc[3]', 'abc[2]', 'abc[1]', 'abc[0]'] ['abc[0]', 'abc[1]', 'abc[2]', 'abc[3]', 'abc[7]', 'abc[14]', 'abc[15]', 'abc[16]', 'abc[24]', 'abc[23]', 'abc[22]', 'abc[21]', 'abc[20]']