← Home ← Back to /g/

Thread 105721539

39 posts 20 images /g/
Anonymous No.105721539 [Report] >>105722506 >>105723099 >>105724904 >>105724989 >>105725674
import my_haiku
import it_soon as you_can
import it_right_now
Anonymous No.105721563 [Report]
Great post
Anonymous No.105721709 [Report] >>105722216
Are you supposed to read the underscore out loud?
Anonymous No.105722216 [Report]
>>105721709
don't you ever say that again
Anonymous No.105722506 [Report] >>105722611
>>105721539 (OP)
Bravo!1 Bravo, frogposter, bravo!!!1 Encore! Encore! Encore!
Anonymous No.105722611 [Report] >>105722832 >>105725674
>>105722506
>>>my_haiku.rocks
True

>>>my_haiku.length
17

>>>you_can.eat_shit
True
Anonymous No.105722832 [Report]
>>105722611
>you_can.eat_shit
Your momma is gay.
And so is your stupid dad.
When I find you, pray.
>>▲
>▲ ▲
Anonymous No.105723099 [Report] >>105723148
>>105721539 (OP)
if True:
print('op's mom died in a car crash, not from the impact, but from the resulting fire while fully conscious')
else:
print('have a nice day and happy life')
Anonymous No.105723148 [Report] >>105723163
>>105723099
IndentationError: expected an indented block after 'if' statement on line 1
Anonymous No.105723163 [Report] >>105723201
>>105723148
nope its, it shows up fine for me in the app but ultimately was passed without the whitespace.
Anonymous No.105723201 [Report] >>105723238 >>105723246
>>105723163
Try using code tags next time.
>#4
https://www.4chan.org/rules#g
if True:
print("op's mom died in a car crash, not from the impact, but from the resulting fire while fully conscious")
else:
print("have a nice day and happy life")
Anonymous No.105723238 [Report] >>105723312
>>105723201
if not True:
print('op's mom died in a car crash, not from the impact, but from the resulting fire while fully conscious')
else:
print('have a nice day and happy life')
Anonymous No.105723246 [Report] >>105723288
>>105723201
while True:
return False;
Anonymous No.105723288 [Report]
>>105723246
your code is not inside a function so the return value does not make sense. It should be
while True:
print(False)
break
Anonymous No.105723312 [Report] >>105723458 >>105723888
>>105723238
ftfy ;3
Anonymous No.105723458 [Report] >>105723947 >>105724021
>>105723312
haha. hard to catch on phone.op\'s should also do the job (i prefer single quotation marks)
Anonymous No.105723888 [Report] >>105723947 >>105724021
>>105723312
>C:\Users\kitte

i know your real name now mr kitty
Anonymous No.105723947 [Report]
>>105723458
That was it. Thanks.
>>105723888
Czech'd and when you find me, kill me.
Anonymous No.105724021 [Report]
>>105723458
That was it, thanks (redux)
>>105723888
Czech'd and when you find me, kill me (redux)
Anonymous No.105724904 [Report] >>105725198
>>105721539 (OP)
int nicevar;
for (nicevar=0; nicevar<16; nicevar++) {
printf("nice");
if (nicevar==4) {
printf("\n");
}
elseif (nicevar==11){
printf("\n");
}
else (nicevar==16){
printf("\n\ni love it!");
}
}
Anonymous No.105724989 [Report] >>105725198
>>105721539 (OP)
from __future__ import annotations

import itertools
import logging
from dataclasses import dataclass, field
from typing import Callable, Iterable, List

logging.basicConfig(
level=logging.INFO,
format="%(asctime)s [%(levelname)s] %(message)s",
datefmt="%H:%M:%S",
)

Duplicator = Callable[[str, int], int] # (letter, index) how many times to keep

@dataclass
class LetterProcessor:

letters: List[str]
duplicator: Duplicator = field(
default_factory=lambda: (lambda letter, idx: 2 if idx == 2 else 1)
)

def __call__(self) -> str: # noqa: D401
logging.debug("Starting processing of %s", self.letters)

indexed: Iterable[tuple[str, int]] = enumerate(self.letters)

repeated: Iterable[str] = itertools.chain.from_iterable(
itertools.repeat(letter, self.duplicator(letter, idx))
for idx, letter in indexed
)

result: str = "".join(repeated)
logging.info("Processed result = %s", result)
return result

if __name__ == "__main__":
letters = ["N", "I", "G", "E", "R"]

processor = LetterProcessor(letters)

final_string = processor()
print(final_string)
Anonymous No.105725198 [Report] >>105725229
>>105724904
Sorry, I don't do C on Windows unless it is C:\
*snort* yuck yuck *snort*
>>105724989
Nope.
Anonymous No.105725229 [Report] >>105725562 >>105725601
>>105725198
>0..15
nooooOOOOOO YOU WERE SUPPOSED TO MAKE IT 16 NOW ITS NOT A HAIKU. MODERATORS
Anonymous No.105725562 [Report] >>105726733
>>105725229
Calm, my friend, calm.
https://www.writebetterpoems.com/articles/how-to-write-haiku
Anonymous No.105725601 [Report]
>>105725229
Anonymous No.105725674 [Report] >>105725677
>>105721539 (OP)
>>105722611
i dont get it
Anonymous No.105725677 [Report] >>105725693
>>105725674
google "what is a haiku"
Anonymous No.105725693 [Report] >>105725704
>>105725677
OPs thing doesnt rhyme though
Anonymous No.105725704 [Report] >>105725751
>>105725693
haikus aren't supposed to rhyme you fucking retard
Anonymous No.105725751 [Report] >>105725758 >>105725798
>>105725704
then what makes a haiku a haiku?
Anonymous No.105725758 [Report] >>105725798
>>105725751
said the retard who doesn't know how to google "what is a haiku"
Anonymous No.105725798 [Report] >>105725805
>>105725751
>>105725758
There is literally a link posted 15 minutes ago that tells you exactly that.
Anonymous No.105725805 [Report] >>105725871
>>105725798
i can't be expected to read every comment here, i have things to do
Anonymous No.105725871 [Report]
>>105725805
To be honest, I don't expect anything from you at all.
Anonymous No.105726733 [Report] >>105726892
>>105725562
this posters a bitch
who cannot stop sucking dicks
my mouth is full too
Anonymous No.105726892 [Report] >>105726938
>>105726733
>posters
Get out, you dumb dumb.
Go back to your homosex life.
Let me live gay free.
Anonymous No.105726938 [Report] >>105726977
>>105726892
yes you are posters
i counted the other men
lala fairy boy
Anonymous No.105726977 [Report] >>105727010
>>105726938
https://dictionary.cambridge.org/us/grammar/british-grammar/this-that-these-those
Anonymous No.105727010 [Report]
>>105726977
this was correct use
for you are not separate
therefore singular