[Question]
  [
Create a program, that outputs a hello world string ("Hello world", "Hello, World" etc.), and source code. Output is written to stdout or equivalent. Hello world string is embedded in the source code.
For example, the output for might be
```
(some source code here)hello world(some source code here)
```
**When the output is compiled or interpreted again, it should create a similar output, but the hello world string must have a different punctuation or capitalization.** For example, the previous example could create the following output
```
(some source code here)hello, wORld(some source code here)
```
Each "(some source code here)" in these examples can change after each execution, or it can be the same.
**Your output must contain a valid hello world string exactly once.** It may contain any amount of invalid hello world strings. Source code may contain any amount of comments, and the hello world string may be embedded in comments. The first program can have either zero or one valid hello world strings, but no more.
Following punctuation is valid:
```
hello, world
hello world
helloworld
```
Any capitalization is acceptable. For example, these are valid hello world strings:
```
Hello, world
hellO WORld
HELLoworlD
```
These strings are not valid:
```
Hello     world
Hello(newline)world
Hello,world
Hello, Steve
```
Your program fails as soon as one of the following conditions are met:
* It outputs a hello world string that has been output during some earlier execution,
* output is no longer valid source code in the same language, or
* output does not contain exactly one valid hello world string.
**Your program is not valid for this contest unless at least two first executions are successful.** This means that the third output is allowed to be invalid. Output of your program may not be random. First execution should always create the same second output, second execution should always create the same third output, etc.
Score is calculated as amount of bytes in the source code of the initial program. Lowest score wins.
Following bonuses do apply (up to -60%):
* -5% \* (N - 2), where N is the index of the execution after which your program produces invalid output. This bonus caps at -50%. If your program succeeds 12 times or more, you get the max bonus.
* -10%, if your outputs (including first source code) include all three valid punctuation alternatives.
Your submission should include the first source code, and it should also contain the outputs of the successful executions. If your program succeeds more than 12 times, add output for 12 executions.
## Example
Next line is the first source code. When we execute it, it is the first execution.
```
hello world(some source code here)
```
Next line is the output from the first source code code. It is the first output.
```
hello, world(some source code here) 
```
Next line is the output from the second execution. It is the second output.
```
helloworld(some source code here)
```
When we executed the first output, this program became eligible for the -10% bonus. That means we have two outputs, and one original code, which all have different punctuation. Moreover, because the second output was valid, this program is eligible for this contest.
Next line is the output from the third execution. It is the third output.
```
Helloworld(some source code here)
```
Next line is the output from the fourth execution. It is the fourth output.
```
hellworld(some source code here)
```
This output was invalid. Index of the last valid execution was 4. This program is eligible for -5% \* (4 - 2) bonus and -10% bonus from the punctuation. This makes total of -20%. The length of the first source code ("hello world(some source code here)") was 34 bytes, so the final score is 27.2.
  
[Answer]
# Mathematica, ~~214~~ 194 - 50% = 97 bytes
```
(a = "helloworld"; b = Apply[StringJoin, Tuples[Thread[Characters[{ToLowerCase[a], ToUpperCase[a]}]]], {1}]; StringReplacePart[ToString[#0, InputForm], b[[FirstPosition[b, a] + 1]], {7, 16}]) & 
```
I decided to optimize for string count here. This runs for 1024 programs without stopping, going through every combination of uppercase and lowercase letters. The execution can be seen [here](http://pastebin.com/Y0NZJA2q).
[Answer]
# Pyth, 17 bytes
A different Pyth solution:
```
"r\"helloworld\"1
```
Output:
```
r"helloworld"1
```
Second output:
```
HELLOWORLD
```
[Answer]
# Vitsy, 33 - 33\*.05\*(11-2) = 18.15 Bytes
Heh! Beat that! You probably will. :c
## First output:
```
'0DV\{25^-V\}}1+{rd3*Z;helloworld
'                                 Start capturing as a string
 0DV                              Push 0 to the stack and set it as the final variable.
    \                             Repeat the next item this many times. (1, 2, 3... on outputs.)
     {                            Rotate the stack leftwards.
      25^                         Push 32 to the stack.
         -                        Subtract the top item by it - this will make lowercase uppercase.
          V\                      Do the next item final variable times.
            }                     Rotate the stack rightwards.
             }                    And again...
              1+                  Add one. This makes the 0 in this code a 1, then 2...
                r                 Reverse the stack.
                 d3*              Get the character '
                    Z             Output all items in the stack.
                     ;            End execution.
                      helloworld  String to manipulate.
```
## Second output:
```
'1DV\{25^-V\}}1+{rd3*Z;helloworlD
```
## Third output:
```
'2DV\{25^-V\}}1+{rd3*Z;helloworLD
```
## Fourth output:
```
'3DV\{25^-V\}}1+{rd3*Z;hellowoRLD
```
## Fifth output:
```
'4DV\{25^-V\}}1+{rd3*Z;hellowORLD
```
## Sixth output:
```
'5DV\{25^-V\}}1+{rd3*Z;helloWORLD
```
## Seventh output:
```
'6DV\{25^-V\}}1+{rd3*Z;hellOWORLD
```
## Eighth output:
```
'7DV\{25^-V\}}1+{rd3*Z;helLOWORLD
```
## Ninth output:
```
'8DV\{25^-V\}}1+{rd3*Z;heLLOWORLD
```
## Tenth output:
```
'9DV\{25^-V\}}1+{rd3*Z;hELLOWORLD
```
## Eleventh output:
```
':DV\{25^-V\}}1+{rd3*Z;HELLOWORLD
```
This is the last output, as it will cause an error.
[Answer]
## CJam, N = ~~3~~ 4, 28 bytes - 10 % - 10 % = 22.4
```
{`_E=-"_~Hello!, World"2<}_~
```
this starts the following chain:
```
{`_E=-"_~Hello, World"2<}_~
{`_E=-"_~Hello World"2<}_~
{`_E=-"_~HelloWorld"2<}_~
{`_E=-"_~Helloorld"2<}_~
```
where the last one no longer contains a valid "Hello, World".
[Test it here.](http://cjam.aditsu.net/#code=%7B%60_E%3D-%22_~Hello!%2C%20World%222%3C%7D_~)
### Explanation
```
{`     e# Quine framework. Leaves a string representation of the block on the stack.
  _E=  e# Make a copy and get the 14th element, which is the character of the first 'o'.
  -    e# Remove that character from the string.
  "_~Hello!, World" e# Push this string, so the "Hello, World!" is part of the code.
  2<   e# Truncate to just "_~" to get the output right.  
}_~
```
Note that the initial program does not contain a valid "Hello, World", but that allows us to go one iteration further.
[Answer]
# CJam ~~69~~ 60 - 50% = 30
I'm still beginner, Please tell me how to golf in CJam.
```
{`_40>\40<_38>~)`2Te[\25<"helloworld"00YbATe[.{{el}{eu}?}`+]W%"_~"}_~
```
It's tedious to print each iteration, as it will valid for 99 iterations.
It works by enumerate the capitalization of hello word. The tedium is to splitting strings into parts as both "hello world" and the counter have to be updated.
Explanation
```
{`_40>\40<_38>~)`2Te[\25<"helloworld"00YbATe[.{{el}{eu}?}`+]W%"_~"}_~
{`                                                                      e# standard quine framework. Thanks for Dennis.
  _40>                                                                  e# get the Yb11..
      \40<                                                              e# get those that not included in top
          _38>~)`2Te[                                                   e# get the accumulator and increment it
                     \25<                                               e# get those before "hello world"
                         "helloworld"                                   e# the Hello World
                                     00                                 e# accumulator
                                        YbATe[                          e# convert to binary and align right.
                                              .{{el}{eu}?}              e# Uppercase if the corresponding bit is 0
                                                          `             e# add quote
                                                           +]W%         e# reorder stack
"_~"}_~
```
NOTE: I don't read the Mathematica answer, sorry, I think it was original
With reordering, and different capitalization, I lose 9 bytes.
```
{`_6<\"helloworld"01YbW%.{{eu}{el}?}`\I>_2<~)`2Te[\2>"_~"}_~
{`                                                   "_~"}_~ e# Standard quine framework
  _6<\                                                       e# Get "{~_6<\"
      "helloworld"                                            e# The helloworld
                  01                                          e# The accumulator
                    Yb                                        e# Convert to base 2
                      W%                                      e# Reverse the binary
                        .{{eu}{el}?}                          e# Convert to uppercase while the corresponding bit is 1.
                                    `                         e# Add quote
                                     _2<                      e# Get accumulator
                                        ~)`2Te[               e# Increment the accumulator
                                               \2>            e# get the rest
                                                 
```
## CJam 73 - 60% = 29.2
This time also enumerate the punctuation.
```
{`:Z6<"HELLOWORLD"0:AYbW%.{{eu}{el}?}`", ":B-_6<BA3%>@6>A)ZW%52<W%"_~"}_~
{`:Z                                                              "_~"}_~ e# Standard Quine Framework
    6<                                                                    e# take the first 6 character
      "HELLOWORLD"                                                        e# Hello, world
                  0:A                                                     e# Accumulator
                     YbW%.{{eu}{el}?}`                                    e# See above
                                      ", ":B                              e# Punctuation
                                            -                             e# Delete punctuation
                                             _6<                          e# "hello
                                                BA3%>                     e# punctuation
                                                     @6>                  e# world"
                                                        A)                e# incremented accumulator
                                                          ZW%52<W%        e# Remaining part
```
[Answer]
# GolfScript, 35 bytes − 50% = 17.5
```
0"HelloWorld"{@@{^.32&\}%`@".~"}.~
```
I decided to go for overkill on the number of executions before a repeat. This program, with its output fed back into the GolfScript interpreter, will produce **890** distinct Hello World strings before the first repeat. As a brief sample, here are the first 15 iterations:
```
0"HelloWorld"{@@{^.32&\}%`@".~"}.~
0"HeLlOWoRlD"{@@{^.32&\}%`@".~"}.~
0"HelLOWorLD"{@@{^.32&\}%`@".~"}.~
0"HeLLOWoRLD"{@@{^.32&\}%`@".~"}.~
0"HellowORLD"{@@{^.32&\}%`@".~"}.~
32"HeLlOworld"{@@{^.32&\}%`@".~"}.~
0"hELloWoRlD"{@@{^.32&\}%`@".~"}.~
32"helLowORld"{@@{^.32&\}%`@".~"}.~
0"HeLLoWORlD"{@@{^.32&\}%`@".~"}.~
32"HellOWORld"{@@{^.32&\}%`@".~"}.~
0"hElLOWORlD"{@@{^.32&\}%`@".~"}.~
32"heLLOWORld"{@@{^.32&\}%`@".~"}.~
32"HelloworLd"{@@{^.32&\}%`@".~"}.~
32"hElLoWoRLd"{@@{^.32&\}%`@".~"}.~
0"HEllOWorlD"{@@{^.32&\}%`@".~"}.~
```
The way it works is by iterating through the string, flipping the capitalization of each letter (by XORing its ASCII code with 32) if the previous letter (after possibly having its case flipped) is lowercase. The first letter will have its case flipped if the number at the beginning program is 32 rather than 0 — and the number output for the next iteration will be 32 whenever the last letter of the string is lowercase, thus causing any changes at the end of the string to propagate back to the beginning on the next iteration.
(This particular feedback process was obtained in a totally *ad hoc* manner. I originally wanted to just run a simple binary counter using uppercase and lowercase as the bits, but that took too many bytes to implement, so I started tweaking it to find something shorter that would still yield a fairly high cycle length. Since the theoretical maximum, using case-flipping only, is 210 = 1024, getting an 890-iteration cycle is pretty nice.)
Alas, the bonus for additional iterations is capped at −50%; without the cap, this program would have a whopping −4440% bonus. ;-)
[Answer]
# Pyth, 18 bytes
```
"-\"hello world\"d
```
Which returns:
```
-"hello world"d
```
Which in turn prints:
```
helloworld
```
I had a solution that did all three spellings, but it's longer even with the bonus.
[Answer]
# Ruby, 81 - 50% = 40.5
Original code:
```
_='_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)';puts _%[_,'HELLOWORL'+?D]
```
Successive outputs:
```
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"HELLOWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"hELLOWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"heLLOWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"helLOWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"hellOWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"helloWORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"hellowORLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"hellowoRLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"helloworLD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"helloworlD"]).sub(/[[:upper:]]/,&:swapcase)
_="_=%p;puts (_%%[_,%p]).sub(/[[:upper:]]/,&:swapcase)";puts (_%[_,"helloworld"]).sub(/[[:upper:]]/,&:swapcase)
```
I think this counts as the full 50%? Might be off by one. Also, there's probably a better-scoring non-bonus solution in Ruby.
The original code doesn't contain "helloworld", but it builds a quine that replaces the first capital letter in its source code with the lowercase version. So each successive run of the quine outputs one fewer capitalized letter.
The trick here is to use a format string to interpolate both the string itself, for quining, and the Hello World string, so that it only appears once.
[Answer]
# [Simplex](http://conorobrien-foxx.github.io/Simplex/), 21 bytes.
This is what Simplex was *born* for. I can definitely go farther with this.
(I keep on hitting Ctrl+Enter, sorry! I blame it on the tablet keyboard)
## Attempt 3, v.0.8+, 31 -5% = 29.45 bytes (UTF-8 methinks)
That emote in the middle expresses myself. Sort of. Why did I do this, again? .\_.
```
"\"f[helloworld]-:D-``\"§R'Hg"g
"                            "  ~~ write that string
 \"f[helloworld]-:D-``\"§R'Hg   ~~ escaped quotes
                              g ~~ output that string
```
2nd Output:
```
"f[helloworld]-:D-``"§R'Hg
"                   "      ~~ write that string
 f[helloworld]-:D-``       ~~ string to be written
                     §R    ~~ go to second cell
                       'H  ~~ set it to H charcode
                         g ~~ output that string
```
3rd output:
```
f[Helloworld]-:D-``
f                   ~~ turns off safety mode (heck yeah error suppression!)
 [          ]-      ~~ write inside to outer program
  H                 ~~ sort strip
   e                ~~ write e = 2.718281828459045... to the strip
    ll              ~~ writes 1 twice to the cell
      o             ~~ outputs 1
       wo           ~~ apply o backwards through the strip (outputs 1)
         r          ~~ error! tries to access register for modification. nope!
          l         ~~ write 1 to to the current cell
           d        ~~ reverse the strip (NOP)
              :     ~~ removes last char of outer program
               D    ~~ double the current byte (2)
                -   ~~ writes previous char to outer program
                 `` ~~ suppress outer program evaluation and instead output it
```
Final output:
```
HelloworlD
```
## Attempt 2, v.0.8+, 21 bytes (UTF-8, I think)
```
"\"helloworld\"§'Hg"g
"                  "  ~~ write that string
 \"helloworld\"§'Hg   ~~ escaped quotes
                    g ~~ output that string
```
Output:
```
"helloworld"§'Hg
"          "     ~~ write that string
 helloworld      ~~ string to be written
            §    ~~ go to first cell
             'H  ~~ set it to H charcode
               g ~~ output that string
```
Final output:
```
helloworld
```
## Attempt 1, v.0.7+ ~~28~~ 26 bytes
I'm not sure if this qualifies for the first bonus…
```
"BhelloworldB"t[s32S;]'gs;
"            "             ~~ write that string
 BhelloworldB              ~~ the string
              t[     ]     ~~ apply the inner from left to right
                s          ~~ output as character
                 32S       ~~ subtract 32 ("capitalize")
                    ;      ~~ add the current byte's char to the outer program
                      'g;s ~~ add g to the outer program
```
First output:
```
"HELLOWORLD"g
```
The outer program is evaluated at the end of execution (it does it for y; this is what the outer program looks like:
```
"HELLOWORLD"g
"          "  ~~ write that string
            g ~~ output that string as string characters
```
Final output:
```
HELLOWORLD
```
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal), score 8
```
`kh#`kH+
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=%60kh%23%60kH%2B&inputs=&header=&footer=)
Outputs:
```
kh#Hello, World! 
```
[Try it Online!](http://lyxal.pythonanywhere.com?flags=&code=kh%23Hello%2C%20World!&inputs=&header=&footer=)
Outputs:
```
Hello World
```
## Explained
```
`kh#`
```
Push the string `"kh#"` onto the stack (which, when literally executed, is the constant `"Hello World"` and a comment)
```
kH+
```
Push the string `"Hello, World!"` onto the stack and concatenate the two strings together. Implicitly print the string.
[Answer]
# PHP, 297 - 40% = 178.2 bytes
Not really competitive but it was fun to write
```
<?ob_start(function($s){$s=substr(str_replace(0,0+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[0]=$h[0]^' ';return "<"."?".$s."?".">".$s.$h;});?>ob_start(function($s){$s=substr(str_replace(0,0+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[0]=$h[0]^' ';return "<"."?".$s."?".">".$s.$h;});
```
It's a variation of this quine:
```
<?
ob_start(function($b){ return "<"."?\n$b?".">\n$b"; });?>
ob_start(function($b){ return "<"."?\n$b?".">\n$b"; });
```
but it also adds "helloworld" to the output and replaces `0` with `0+1` (in the next iteration `1` with `1+1` and so on). Using `substr` any existing "helloworld" output gets removed before the new "helloworld" gets added.
To get different output, one letter of "helloworld" gets capitalized (determined by the incrementing number). This is the relevant code:
```
$h=hello.world;$h[0]=$h[0]^' '
```
A challenge was to not use any numbers except here and for the number replacement
```
str_replace(0,0+(int)true,$s)
```
There you already see that `+1` is realized as `+(int)true`.
For the substring arguments I needed `0, 146`:
```
!i, ord(I)+ord(I)
```
The non-empty string "i" gets coerced to `true` and negated. `false` is a valid integer argument and is treated like `0`. `ord(I)` is the ASCII value of "I": 73
### Output (1st iteration):
```
<?ob_start(function($s){$s=substr(str_replace(1,1+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[1]=$h[1]^' ';return "<"."?".$s."?".">".$s.$h;});?>ob_start(function($s){$s=substr(str_replace(1,1+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[1]=$h[1]^' ';return "<"."?".$s."?".">".$s.$h;});Helloworld
```
### Output (2nd iteration):
```
<?ob_start(function($s){$s=substr(str_replace(2,2+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[2]=$h[2]^' ';return "<"."?".$s."?".">".$s.$h;});?>ob_start(function($s){$s=substr(str_replace(2,2+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[2]=$h[2]^' ';return "<"."?".$s."?".">".$s.$h;});hElloworld
```
### Output (10th iteration):
This is the last valid output but not a valid program anymore
```
<?ob_start(function($s){$s=substr(str_replace(10,10+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[10]=$h[10]^' ';return "<"."?".$s."?".">".$s.$h?>ob_start(function($s){$s=substr(str_replace(10,10+(int)true,$s),!i,ord(I)+ord(I));$h=hello.world;$h[10]=$h[10]^' ';return "<"."?".$s."?".">".$s.$hhelloworlD
```
> 
> Scroll far to the right to find the "Hello world" strings!
> 
> 
> 
[Answer]
# Pip, 48 - 50% = 24
```
V Y"`V Y`.RPyRh:ST`helloworld`UCh@<0.h@>0R0o+0"
```
which evolves as follows:
```
V Y"`V Y`.RPyRh:ST`helloworld`UCh@<1.h@>1R1o+1"
V Y"`V Y`.RPyRh:ST`Helloworld`UCh@<2.h@>2R2o+2"
V Y"`V Y`.RPyRh:ST`HElloworld`UCh@<3.h@>3R3o+3"
V Y"`V Y`.RPyRh:ST`HELloworld`UCh@<4.h@>4R4o+4"
V Y"`V Y`.RPyRh:ST`HELLoworld`UCh@<5.h@>5R5o+5"
V Y"`V Y`.RPyRh:ST`HELLOworld`UCh@<6.h@>6R6o+6"
V Y"`V Y`.RPyRh:ST`HELLOWorld`UCh@<7.h@>7R7o+7"
V Y"`V Y`.RPyRh:ST`HELLOWOrld`UCh@<8.h@>8R8o+8"
V Y"`V Y`.RPyRh:ST`HELLOWORld`UCh@<9.h@>9R9o+9"
V Y"`V Y`.RPyRh:ST`HELLOWORLd`UCh@<10.h@>10R10o+10"
V Y"`V Y`.RPyRh:ST`HELLOWORLD`UCh@<11.h@>11R11o+11"
V Y"`V Y`.RPyRh:ST`HELLOWORLD`UCh@<12.h@>12R12o+12"
```
with the last output being invalid because the `HELLOWORLD` hasn't changed. (Correct me if I haven't done the bonus right.)
Thanks to this question, I just discovered a new quine technique! The base quine is `V Y"`V Y`.RPy"`:
```
  Y"         "  Yank that string into the variable y
V               Evaluate it as a Pip expression:
          RPy   y wrapped in double quotes (repr)
    `V Y`.      Prepend that regex pattern
                When this is evaluated, it returns a pattern object, which is
                auto-printed--conveniently, without the `` delimiters
```
Our extra code modifies the string in `y`, before repr-ing it, as follows:
* Replace the current helloworld with one in which the leftmost `0` characters are uppercased;
* Replace all occurrences of `0` with `o+0` (where `o` is a builtin variable that equals 1).
The next time around the number in the code is `1` instead of `0`, and so forth.
[Answer]
# Javascript, 52 bytes
```
function(){return '("hello world").replace(" ","")'}
```
## Test
`=>`
`<='("hello world").replace(" ","")'`
`=> eval('("hello world").replace(" ","")')`
`<= 'helloworld'`
[Answer]
# BBC BASIC, 56 bytes
I had a crack at this before I realized how late to the game I am. For what it's worth, here's my version and my first attempt at StackExchange code golf.
Here, *V.* echoes out the characters given by the ASCII codes in the following comma separated list and *P.* is shorthand for print. I make use of the backspace character to overwrite the existing 'helloworld' string.
**Input code:**
```
V.80,46,34:P."helloworld";:V.8,68,34,59:P.":V.8,8,76,68"
```
**First Output:**
```
P."helloworlD";:V.8,8,76,68
```
**Second Output:**
```
helloworLD
```
It can be tested online at <https://bbc.godbolt.org/>
[Answer]
## ///, 23 bytes
```
/,//\/ \/\/hello, world
```
[Try it online!](https://tio.run/##K85JLM5ILf7/X19HXz9GXyEGSGSk5uTk6yiU5xflpPz/DwA "/// – Try It Online")
First output:
```
/ //hello world
```
Second output:
```
helloworld
```
[Answer]
# [Keg](https://github.com/JonoCode9374/Keg), ~~32~~ ~~28~~ ~~23~~ ~~22~~ 21 bytes
```
CKQNVNKKDG`(⑨,)`‘H%c¡
```
[Try it online!](https://tio.run/##y05N///f2TvQL8zP29vFPUHj0cQVOpoJjxpmeKgmH1r4/z8A "Keg – Try It Online")
This prints:
```
CKQNVNKKDG(⑨,)HelloWorld
```
Which prints:
```
HELLOWORLD
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), score ~~15~~ 9
*-9 bytes thanks to [ovs](https://codegolf.stackexchange.com/users/64121/ovs).*
```
’"Ÿ™ ‚ï"á
```
[Try it online!](https://tio.run/##ARwA4/9vc2FiaWX//@KAmSLFuOKEoiDigJrDryLDof// "05AB1E – Try It Online")
Output:
```
"hello world"á
```
Second output:
```
helloworld
```
---
```
’...  # trimmed program
’...  # push "\"hello world\"á"
      # implicit output
"..."á  # trimmed program
     á  # push only letters in...
"..."   # literal
        # implicit output
```
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `D`, 20.5 bytes
```
`⌐÷:aBk⁋+›bḢ¨£ßN∑kTtp+q‛:Ė+,helloworld`:Ė
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJEIiwiIiwiYOKMkMO3OmFCa+KBiyvigLpi4biiwqjCo8OfTuKIkWtUdHArceKAmzrElissaGVsbG93b3JsZGA6xJYiLCIiLCIiXQ==)
This outputs all 1024 different capitalisations of `helloworld`.
```
`                     q‛:Ė+           `:Ė # Quine structure
                           ,              # Eventually print the result
                            helloworld    # Ignored
 ⌐÷                                       # Push the bits before and after the comma
   :a                                     # Check capitalisation
     Bk⁋+›bḢ                              # Binary increment
            ¨£ßN∑                         # Capitalise
                 kTtp                     # Prepend a comma
                     +                    # Append to the rest of the code
```
]