Share your repls and programming experiences

← Back to all posts
colorful double helix
procoder165 (108)

was bored again in class so I decided to make this.

Commentshotnewtop
CodingNS (10)

Nice! I can watch this for like 5 min straight.

AdCharity (677)

nice :D I would add the middle bars as well (like the nitrogenous bases stuff)

AdCharity (677)

@procoder165 if you look at it the right way it looks like it's spinning

DJWang (439)

Boi this is awesome

pyplacca (1)

Very cool @imnuex
Why don't you use a single print function and set the sep keyword to '\n'. Like this;

print(arg1, arg2, ..., sep='\n')
imnuex (4)

@pyplacca or defining a function then using it as a loop.

pyplacca (1)

@imnuex but then, print still appears more than once for the same purpose. You need to keep the Don't Repeat Yourself principle in mind.
So you could write something like this;

def h():
    print(
        '*'*6, 
        '*'*5,
        '*'*4,
        '*'*3,
        '*'*2,
        '*'*1,
        '*'*1,
        '*'*2,
        '*'*3,
        '*'*4,
        '*'*5,
        '*'*6,
        sep='\n'
    )
while True:
    h()
imnuex (4)

@pyplacca I do remember the DRY principle.

Evanlicious (0)

@imnuex Hey, I made a shortening of your code if you want to see it. I made it more loop based, and I made it so it was not a function. I reduced the number of lines a bit too, not sure if it goes faster though.

https://repl.it/@Evanlicious/Revision-of-a-cool-thing

https://repl.it/@Evanlicious/Revision-of-a-cool-thing

RayvelArjoon (12)
System.out.println('That\'s awesome!');
System.out.println('But JavaScript is waaaayyyyyyy cooler...');
procoder165 (108)

@KEOLAOTA i can help you out in java, i cant really do html that well

CosmoCat07 (1)

@KEOLAOTA I can help you with html

SombreBatSoup (0)

This is trippy! XD

Tylerdclark (0)

Very cool! Do you have any suggested reading to learn about shell coloring?

abbydebell (0)

made this in Neon (boArD ToO LOL XD) check it out if u wanna :p
https://repl.it/join/qakcwdah-abbydebell

lellala (0)

this is hypnotising. ITS GREAT! XD

Epicboy (0)

Really Cool dude

JamesGordon1 (23)

I remixed this to add color
https://repl.it/@JamesGordon1/colorized-double-helix
(board in class as well, lol)