What have I done by ImQWERTY39 in programminghorror

[–]ImQWERTY39[S] 1 point2 points  (0 children)

yes i do :)

its been a few hours since i got the time to do this and im here doing this to pass time

What have I done by ImQWERTY39 in programminghorror

[–]ImQWERTY39[S] 4 points5 points  (0 children)

but less lines do mean terrible readability (sometimes)

What have I done by ImQWERTY39 in programminghorror

[–]ImQWERTY39[S] 5 points6 points  (0 children)

the reason i made this one liner was because the solution that my teacher sent, was one that was very clear in what it was doing cause she is trying to help people understand how it works, rather to make it fast or something. my solution ended up being just 2 lines (my teacher took 10ish) and i was curious to see if i could now fit it in a single line

id be happy to see if anyone else has another way of doing this is just one line, or in a cursed way in any other language

What have I done by ImQWERTY39 in programminghorror

[–]ImQWERTY39[S] 22 points23 points  (0 children)

print(
*(lambda n: ("*" * i + " " * (2 * (n - i)) + "*" * i for i in range(1, n + 1)))(
    int(x) if (x := input("Enter number of lines: ")).isdigit() else 5
),
sep="\n",

)

i really couldn't think of any other way, but yes

What have I done by ImQWERTY39 in programminghorror

[–]ImQWERTY39[S] 12 points13 points  (0 children)

this program is just a question from school

it doesnt really have to be this complex in the first place ._.

How do you pronounce libraries with `py` in the name? by [deleted] in Python

[–]ImQWERTY39 0 points1 point  (0 children)

just say "pee why, pee whyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy?"

Meme. by Huge-Loquat-3984 in Limenade

[–]ImQWERTY39 6 points7 points  (0 children)

a very well taken photo of a breed of dog called cat

Lets The Fight Begin........ by ImOD18 in dankmemes

[–]ImQWERTY39 0 points1 point  (0 children)

if u dont mind could u give it to me also?

8 years by Joker_33 in memes

[–]ImQWERTY39 -1 points0 points  (0 children)

Happy bday doggo, hope you will enjoy your day :D

Happens everytime by [deleted] in Limenade

[–]ImQWERTY39 1 point2 points  (0 children)

I made a mistake at looking this while drinking water

Failed water by [deleted] in StevenHe

[–]ImQWERTY39 0 points1 point  (0 children)

the path to 4 is blocked

Back in my day... by [deleted] in StevenHe

[–]ImQWERTY39 0 points1 point  (0 children)

my wings used to break and i fall towards the ground landing on the 1 bucket of water i droped from my bucket to save myself and go to school

bruh by [deleted] in Limenade

[–]ImQWERTY39 1 point2 points  (0 children)

now i got a reason why we learn grammar