46
7
Animate the text in your terminal
The goal
The goal is to "animate" the string "Hello world" in your output so that each character gets capitalised after each other.
Your program can exit after each letter has been capitalised.
For example;
# Iteration 1
Hello world
# Iteration 2
hEllo world
# Iteration 3
heLlo world
# Iteration 4
helLo world
# Iteration 5
hellO world
# Iteration 6 (note: it should capitilize the space char (ie: a break between iteration 5 and iteration 7)
hello world
# Iteration 7
hello World
# Iteration 8
hello wOrld
# Iteration 9
hello woRld
# Iteration 10
hello worLd
# Iteration 11
hello worlD
It should only animate the string once and between each state there should be a 1 second delay.
Input
No input is required, but "Hello world" must be the string that is "animated".
Output
The string "Hello world" must be animated. The output must be as 1 line to create a sort of wave animation. An empty trailing new line is allowed. Example gif;
I saw this on a metasploit youtube video and thought the effect was pretty cool, which is where I recorded the gif from, so it's a little laggy, but I hope it illustrates the output fine
This is code-golf, lowest byte-count will be deemed the winner.
Can it exit and stop with an error? – Stewie Griffin – 2017-02-13T12:26:45.323
@StewieGriffin as long as the animation is viewable, sure. – ʰᵈˑ – 2017-02-13T13:38:23.730
I don't think the 1 second delay adds to the challenge. We've had a bunch like that and each time it seems like the same boilerplate is added. – xnor – 2017-02-13T13:39:07.283
2@xnor Do you mean the duration of the delay being 1 second explicitly, or do you mean any delay at all? Latter wouldn't make any sense since it's an animation after all.. – Metoniem – 2017-02-13T13:43:40.180
@Metoniem Any fixed-time delay. – xnor – 2017-02-13T13:44:14.837
Oh, in that case I agree for sure. Writing 1000 instead of 1 costs me 3 bytes already >:( @xnor – Metoniem – 2017-02-13T13:45:58.777
@ʰᵈˑAre additional leading iterations allowed? – Metoniem – 2017-02-14T14:44:17.020
1@Metoniem No, only the ones described in the goal. Unless I've misunderstood. Each letter must be capitalised once from left to right once only, starting with "H" in "hello" and ending with "D" in "world" – ʰᵈˑ – 2017-02-14T17:06:54.563
@ʰᵈˑYou understood! Okay then, thanks. – Metoniem – 2017-02-15T08:17:29.473
For a better view of this effect as seen when starting the Metasploit Framework: Metasploit For Beginners - #1 @~5:50
– 3D1T0R – 2018-07-16T19:05:15.397