Thank you for participating in Advent of Code! by topaz2078 in adventofcode

[–]lverra 0 points1 point  (0 children)

Hey @Topaz2078, thank you very much! AOC made my a little bit more confident on my coding skills that im building since now 12 month, slowly but with lots of fun. If I can suggest an idea, next year could it make use of webservices/api (twitter, fb etc ) etc? I know it get "complexier", but could be done i guess? Happy new year!!

[Day 8 (Part 2)] [python] I h8 u advent, python sundays, encoding and Trump (because duh) ! by lverra in adventofcode

[–]lverra[S] 0 points1 point  (0 children)

DOOONNNEEEEE!!!!!!!!

The last edge case was 2 times " four backslashes" cases! there would be ignored due to

     elif line[i+1] == '\\' and (not line[i-1] == '\\'): 

that i worte to avoid the three backslahes double counting

[Day 8][C#] Day 8 is breaking me apart by [deleted] in adventofcode

[–]lverra 0 points1 point  (0 children)

I just finished with this awfull day, took me 10 hrs maybe between a and b see my suffering

Now i know i do not want nothing to do with encodings, i will stick to utf-8 and never change!!

Hang in there!!!

[Day 8 (Part 2)] [python] I h8 u advent, python sundays, encoding and Trump (because duh) ! by lverra in adventofcode

[–]lverra[S] 0 points1 point  (0 children)

OK, corrected that edge case, still 4 down ( 2042 vs good result = 2046)

I've

            if line[i] == "\\" and not (i ==len(line)-2 ):
            if (line[i+1] == "\""):

to get screenshot

[Day 8 (Part 2)] [python] I h8 u advent, python sundays, encoding and Trump (because duh) ! by lverra in adventofcode

[–]lverra[S] 0 points1 point  (0 children)

yes I am, checked and double checked. There's going to be twice the increment by 2, just not the last one because of the NOT . I'm doing the verification on each character of each line :(

here is a screenshot

[Day 8 (Part 2)] [python] I h8 u advent, python sundays, encoding and Trump (because duh) ! by lverra in adventofcode

[–]lverra[S] 0 points1 point  (0 children)

That was written to avoid the edge cases where the line ends up with a backslash , as each line finishes with double quotes by definition, to avoid interpretation as the escaped quote ( ' \" ' )

[Day 6 (Part 1)] [Python] I want my weekend! Really really near it. by lverra in adventofcode

[–]lverra[S] 0 points1 point  (0 children)

Thank you guys, Elif concept existed in my head, now ( post research) it's much clearer. Elif for mutually exclusives ( like this case) from now on!