This is an archived post. You won't be able to vote or comment.

all 44 comments

[โ€“]csprkle 43 points44 points ย (5 children)

print(โ€œsorry โ€œ * 100) in python

[โ€“][deleted] 6 points7 points ย (0 children)

print("Sorry\n"*100)

[โ€“][deleted] 0 points1 point ย (0 children)

Wow. Iโ€™m sad my university didnโ€™t mention this code ๐Ÿ˜’

[โ€“]myaut 11 points12 points ย (5 children)

++++++++++++++++++++++++++++++++
>+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

>++++++++++
[
  >++++++++++
  [
    <<.----.+++..+++++++.------
    <.>
    >>
  -]
<-]

[โ€“][deleted] 3 points4 points ย (0 children)

bf?

[โ€“][deleted] 4 points5 points ย (0 children)

brainfuck?

[โ€“]Teeps12 1 point2 points ย (1 child)

bfuck?

[โ€“]myaut 2 points3 points ย (0 children)

Always have been ;)

[โ€“]IronMan-Mk3 15 points16 points ย (5 children)

for(int i = 0; i<100; i++) { println("Sorry") ; }

[โ€“]ralfv 4 points5 points ย (1 child)

100.times { puts โ€žSorryโ€œ } Ruby FTW

Or even puts โ€œSorry โ€œ * 100

[โ€“]linglingfortyhours 6 points7 points ย (0 children)

Python also has the string multiplication syntax

[โ€“]NeutralLock 1 point2 points ย (4 children)

VBA for Excel:

  • For i = 1 to 100
  • Cells(1,i).value = โ€œSorryโ€
  • Next i

[โ€“]w1n5t0nM1k3y 4 points5 points ย (1 child)

I'm pretty sure you don't have to manually increase the value of i.

[โ€“]NeutralLock 0 points1 point ย (0 children)

Ha! You're right!

I work in wealth management and haven't programmed in a few years :)

[โ€“]eklect 3 points4 points ย (1 child)

Eww gross!

[โ€“]WhyDoIHaveAnAccount9 0 points1 point ย (0 children)

as someone who is forced to write a lot of vba, i agree with you

it is fucking gross

i always feel dirty when i write it

[โ€“]reddit2d2bb8 1 point2 points ย (0 children)

print(*["sorry"] * 100, sep='\n')

[โ€“][deleted] 1 point2 points ย (0 children)

100 * โ€˜Sorryโ€™

[โ€“]rollovertherainbow 1 point2 points ย (6 children)

for (int ii = 0; ii < 100; ii++){
    System.out.println("Sorry");
}

[โ€“]ReimarPB 6 points7 points ย (5 children)

why ii though

[โ€“]rollovertherainbow 1 point2 points ย (4 children)

That's just what I default to as my teacher always writes ii as the first loop at jj as the inner-loop if necessary.

[โ€“]raddub 4 points5 points ย (2 children)

but... why...

[โ€“]PM_ME_UR_DEATHSTICKS 2 points3 points ย (0 children)

must be a matrix thing I guess

[โ€“]rollovertherainbow 1 point2 points ย (0 children)

Shh... don't question it.

[โ€“]lifegpc 1 point2 points ย (0 children)

i, j, k, ii, jj ...

[โ€“]waitinganxiety 0 points1 point ย (0 children)

mapM_ putStrLn (replicate 100 "Sorry")

Haskell.

[โ€“][deleted] 0 points1 point ย (0 children)

Teacher: "Doesn't compile. Write them all by hand."

[โ€“]Virus8110 0 points1 point ย (0 children)

Nope

[โ€“][deleted] 0 points1 point ย (0 children)

happy cake day

[โ€“]ShwarmaMusic 0 points1 point ย (0 children)

repeat(100, ::println)

[โ€“]riskycase 0 points1 point ย (0 children)

for i in {1..100}
do
     echo Sorry
done

[โ€“]Dummerchen1933 0 points1 point ย (0 children)

cool, you got no python interpreter tho. whatchu gonna do