ASCII art puzzle discussion


#422

or you have an issue in your code when you insert an integer in the middle :slight_smile:

cout << offset;


#423

Hi Thibaud,

First of all, thanks for the answer.

But I don’t understand.
On the screenshot, you can look at my code on the right.
I do not insert anything, I just print the input.

Sorry if I’m missing your point.


#424

I can’t see much on your screenshot :wink:

I just tried outputting the input and got it right. Moreover, if I remove the line where you print the offset variable in your code, I get no issue.


#425

Ok… I’m just dumb af XD

And now I understand your first message. I didn’t know you could see my code.

Sorry for bothering you for such a silly mistake.

Thanks!


#426

I had problem with the Lorem ipsum test in Lua.

To solve it I used the function string:gsub() and the necessary character class. In this case the %p & %s classes.

I would read the T string via the gsub function and that way replace all the “unknown” characters with “?”.


#427

I’m trying to do this puzzle in Python3.
I’m confused about the output string. Regardless the algorythm, even if I print a static string (for the first excercise with letter ‘E’) I get odd feedback.

Example 1
If I print static:
print("### ")
I get:
Found: Nothing
Expected: "### "

Example 2
If I print static:
print("### \0")
I get:
Found: "### "
Expected: "### "

Why on earth should I use ‘\0’ in Python? Why is the result still incorrect?


#428

You are expected to print more than 1 line. The “Found: Nothing” refers to the missing 2nd line.


#430

have you mantioned space in your program, because lot of languages skip space as it is not needed. Also look through every signs like: !., ? and so one.
Hope it will be helpful!
Sincerely Boolmachine.


#431

Hello,
Does someone know why I have a memory issue using this:

int main()
{
int L;
cin >> L; cin.ignore();
int H;
cin >> H; cin.ignore();
string T;
getline(cin, T);
int row = H - 1;
int counter = 0;
string art_array[row][26];
for(int i=0; i < H; i++) // going down the array
{
string ROW;
getline(cin, ROW);
for(int j=0; j < 26; j++) // going along the array
{
art_array[i][j] = ROW.substr(j*L, L);
std::cout << art_array[i][j] << std::endl;
}
}
}


#432

Oh yeah easy. You say art_array[H-1][26]
but then you make i goes from 0 to H-1, instead H-2


#433

Oh yeah I see it know thank you very much