ASCII art puzzle discussion


#444

I also think that some descriptions are just not detailed enough.

Input

Line 1: the width L of a letter represented in ASCII art. All letters are the same width.

Line 2: the height H of a letter represented in ASCII art. All letters are the same height.

Line 3: The line of text T, composed of N ASCII characters.

Following lines: the string of characters ABCDEFGHIJKLMNOPQRSTUVWXYZ? Represented in ASCII art.

so
“for i in xrange(h):
row = raw_input()”

gives me what exactly?
does it go through the first row from left to right, then the next, row, etc., putting all that stuff behindt one another?

or does it give me some array of arrays, where each inner array contains one line?
or an array of strings where each sring contains the symbols of one line?

and how is that supposed to help me if I get some “** *** * *** * * * * *** * ** ** *” as
input which by some weird formatting should display “1 2 3” in ascii art?

I say that we should somehow be able to actually view the input we get.

cause currently I have o downright guess what the input will look like as the raw_input() function doesnt even tell me what the f*ck it is gonna give me, if it’s some integer, a string, an array, or something completely different?

given that some weird int(raw_input()) function exists doesn’t really make it any easier :-/


#445

Example :

letter E is represented as follow :

xxx
x
xxx
x
xxx

you will have L = 3 and H = 5.

so you’ll have for each raw_input (H times) have to split the string by 3 char to get all chars [A-Z] + ?

better ?

PS : Don’t forget in Python you can debug with

print(“Debug messages…”, file=sys.stderr) //Python3
print >> sys.stderr, “Debug messages…” //Python

for better understanding you should do :

for i in xrange(h):
    print(raw_input(), file=sys.stderr)

#446

I think I see. so the first raw_input() gives me the whole top row of all the letters+?.
next one gives the second line.
etc. up till the fifth execution which gives the fifth and final line.

I think I get how it goes then.

I always find the raw_input() thing confusing as I never know in what form the input will be given.
or I didn’t read the descriptions well enough :smiley:


#447

That’s it :wink:

for E again : first one will give you “xxx” second one "x " third “xxx” fourth "x " and fifth “xxx”. Note that spaces are important !

Remember it’s just an example with only one letter. For the puzzle you’ll have all the letters+? on each line !


#448

Even if you don’t undersand the description, you know that raw_input() reads a line and gives you back a string.
So I don’t get your rant :

cause currently I have o downright guess what the input will look like as the raw_input() function doesnt even tell me what the f*ck it is gonna give me, if it’s some integer, a string, an array, or something completely different?


#449

Try this:

Take a breath.
Go to Settings, select Expert mode
Click on the buttons next to the test cases to view the inputs.


#450

yeah, I obviously know that. Cause I’m the fucking messiah and can read minds!

the non existent explanation of that trasdh function explained it perfectly, how could i have forgotten that? :open_mouth:
And here i was wondering what this thing does, what it takes as input and what it gives as output (and in what shape ).

In a normal program, I could use the “System.Out.println()” command (in java) to let the program simply show me the input and output of the thing and deduce what it does.
here?

well, not so much. cause print is already reserved here and i can’t generate some console text as i would love to. so I could test in between what the inpouts and putputs are and find where the error occurs.


#451

try

System.err.println();

It is explained when you start the puzzle

// Write an action using System.out.println()
// To debug: System.err.println(“Debug messages…”);


#452

Where is the code… can someone help me with the code - JAVA


#453

What is your problem ? Give us details !


#454

Hi. I just finished this puzzle, and got all test right except the lorem ipsum test.

I have no idea how the lorem ipsum is different from other tests.

Possible mistake in my code: I don’t put constraint in the sentence T. Then I tried to put constraint but doesn’t give any success. And it is more confusing since I don’t know what is really different from the lorem ipsum case. Thanks for the help!


#455

Please help!
On test case 2 - MANHATTAN
No matter what I try, I can’t solve it because there seems to be some sort of character limit on my output.
Test case 1 was no problem, I made several variables such as "### " or " # " and just assembled them for each line but when I tried to do MANHATTAN I put my variables together like print(var1 + var2…) and it came out as “Nothing”. I deleted one variable off and it came out with the output I had, which was obviously wrong, but at least it was something. So I tried making a variable called “manhat” and copied the desired output. “Nothing”. I deleted the last space off of manhat and it worked- but still was wrong because it was missing the last space. So, I made mannhat = manhat + " ", and it also came back as “Nothing”. I read through the other comments before I wrote this, and noticed that someone used C and succeeded, so I think its just a language issue.
Also I don’t really understand test case 5

TLDR; There seems to be a character limit when using Python, and I’m confused as to what exactly is Test Case 5

Thanks!