g | x | w | all
Bytes Lang Time Link
041AWK241205T053008Zxrs
039Rust240919T164112Zcobrexus
031JavaScript210727T214150Zcobrexus
009Thunno 2230608T133915ZThe Thon
nan230119T171846ZThe Thon
105Acc!!230119T170745ZDLosc
030PHP191013T180556ZProgrock
029Factor230119T122144Zchunes
048C gcc230118T165556ZPeter
031.COM230118T150826Zl4m2
030Python 3220621T171611ZZachary
037QBasic220621T151929ZDLosc
012Pip220621T150957ZDLosc
020Zsh190827T150117ZGammaFun
048eTeX220304T152503Zplante
032APOL220303T193132ZGinger
023FALSE210728T191658ZJoseph W
007Vyxal r210727T013645Zlyxal
050Javascript200813T105805ZYaroslav
010Retina200813T090533Zovs
059MAWP200813T085015ZRazetime
052Kotlin200321T093402Zsnail_
008W j200321T084410Zuser9206
103Whitespace191011T092318ZDorian
nanW d191208T065203Zuser8505
038TIBASIC200119T122228Zabsolute
066naz200119T044841Zsporebal
011GolfScript200118T094733Zuser8505
013Charcoal191219T230246ZPseudo N
582Shakespeare Programming Language191219T144256ZHello Go
030C# Visual C# Interactive Compiler191219T135632ZJirka Pi
007Keg190712T075622Zlyxal
017Pushy191208T192310ZFlipTack
030Wren191208T063606Zuser8505
013sed190827T150517ZGammaFun
034GNU Smalltalk190827T141608Zuser8505
031PHP190803T151838ZShiSHcat
028Extended BrainFuck190713T135837ZSylweste
042Java OpenJDK 8190803T074051ZCuttingC
02033190803T051333ZTheOnlyM
061ScPL190730T002628Zpfg
068Boolfuck190712T130710ZEdgyNerd
047Boolfuck190715T014207ZJo King
022Zozotez190713T142845ZSylweste
104Pepe190713T122439ZRedClove
052brainfuck190712T055600ZJo King
038Racket190712T050524ZWinny
016Underload190711T071712ZEdgyNerd
022Keg190711T042731Zuser8505
020PowerShell190707T175611ZAndrei O
032R190708T202405ZRobert S
405Turing Machine But Way Worse190707T174145ZMilkyWay
077Dart190709T120118ZElcan
028Ruby190708T112014ZDaveMong
008Jelly190707T150712ZJonathan
009Jelly190707T153632ZLuis Men
124Java JDK190708T174256ZFelix Bo
037Python 3190708T215433ZDat
031Python 3190707T145841ZJonathan
072brainfuck190708T195302ZHelena
0258088 Assembly190708T163058Z640KB
2623PHP190708T165108Z640KB
046Sinclair ZX80 BASIC 4K ROM 46 tokenized BASIC bytes190708T163621ZShaun Be
021Runic Enchantments190708T155930ZDraco18s
035F# .NET Core190708T003512ZLSM07
011Japt P190708T122617ZOliver
nanWindows batch190708T034215Zuser8505
012Pyth190708T100730ZSok
00905AB1E190708T080652ZKevin Cr
024Excel190708T093509ZWernisch
022Ruby190708T075511ZG B
033Python 3190708T071728Zruohola
018Befunge93190707T153816Znegative
032Python 2190708T060434ZElPedro
031JavaScript190708T055717ZADJenks
013APL Dyalog Unicode190707T140533ZAdá
015Perl 5 p190708T035346ZXcali
038C190708T012353Zpommicke
nanPython 3190707T143739Zuser8505
023///190708T005906Zsporkl
043My shortest possible solution in Python190707T143639ZIshaq Kh
030Java190707T213529ZBenjamin
024Attache190707T204415ZConor O&
023C# Visual C# Interactive Compiler190707T204406ZExpired
038Wolfram Language Mathematica190707T155605ZRoman
008Stax190707T151444Zrecursiv
016K oK190707T172523Zmkst
034Haskell190707T161245Znimi
020bash190707T160356ZDoorknob
020Retina 0.8.2190707T153956ZNeil

AWK, 41 bytes

BEGIN{getline x;print x~/G/?"Bad":"Good"}

Attempt This Online!

Another way to go about it:

$0=/G/?"Bad":"Good"

To Test:

awk '$0=/G/?"Bad":"Good"' <<< "Good"

Rust, 39 bytes

let f=|s|if "bad"<s{"bad"}else{"good"};

Attempt This Online!

JavaScript, 35 32 31 bytes

-3 bytes thanks to @xigoi

-1 byte thanks to @l4m2

alert(prompt()[3]?'Bad':'Good')

Thunno 2, 9 bytes

’⁽ȯBad’$o

Attempt This Online!

Explanation

’⁽ȯBad’$o  # Implicit input
’⁽ȯBad’    # Compressed string "GoodBad"
       $o  # Remove the input
           # Implicit output

Thunno, \$15\log_{256}(96)\approx\$ 12.35 bytes

"Bad"Dz0=?"Good

Attempt This Online!

"Bad"Dz0=?"Good  # Implicit input
"Bad"D           # Push the string bad and duplicate           (STACK: "Bad", "Bad")
      z0         # Push the input                              (STACK: "Bad", "Bad", input)
        =?"Good  # If they are equal, push the string "Good"   (STACK: "Bad", "Good") IF input == "Bad"
                 # Otherwise, the stack is left as-is          (STACK: "Bad") IF input != "Bad"
                 # Implicit output of top of stack

Acc!!, 105 bytes

N
Count i while _/71 {
Write 66
Write 97
0
}
Count i while _ {
Write 71
Write 111
Write 111
0
}
Write 100

Try it online!

Explanation

# Read a character from stdin (user must enter a full line)
N
# Loop while the character code int-divided by 71 is nonzero (i.e. G was entered)
Count i while _ / 71 {
  # Write Ba
  Write 66
  Write 97
  # Set accumulator to 0 to exit the loop
  0
}
# Loop while the accumulator is nonzero (i.e. previous loop did not run)
Count i while _ {
  # Write Goo
  Write 71
  Write 111
  Write 111
  # Set accumulator to 0 to exit the loop
  0
}
# Write d
Write 100

PHP, 30 bytes

<?=strtok(BaGoo,readline()).d;

Best suppress notices.

Factor, 29 bytes

read1 66 = "Good""Bad"? print

Try it online!

C (gcc), 48 bytes

main(){puts(getchar()-66?"Bad":"Good");}

Try It Online!

The program only actually takes one character as input, although getchar reads until a newline is found unlike getch which only lets you input a single character. It checks if there's a difference between that character and the ascii code for 'B' (66), printing "Bad" if there is and "Good" if there isn't.

.COM, 31 bytes

org 0x100
mov dx, 0x100
mov eax, 0xA20 + '$$'*0x10000
int 0x21
inc dx
inc dx
xor dword [0x102], 'Good' xor ('Bad'+0x0d000000)
mov al, 0x20
int 0x29     ; Avoid "Badd"
mov ah, 9
int 0x21
ret

Python 3, 30 Bytes

exit({'Good','Bad'}-{input()})

Uses the same exit trick as the other python 3 solution. It's unclear to me if this solution is necessarily allowed by the problem, but the output is certainly separated from the input, so I think it counts.

QBasic, 37 bytes

INPUT s$
IF"C"<s$THEN?"Bad"ELSE?"Good

Try it at Archive.org

Explanation

Uses string comparison to separate the two cases. Ungolfed:

INPUT s$
IF "C" < s$ THEN PRINT "Bad" ELSE PRINT "Good"

Pip, 12 bytes

"GoodBad"RMq

Attempt This Online!

Explanation

           q  ; Read a line of input from stdin
         RM   ; Remove that substring from
"GoodBad"     ; This literal string

Zsh, 21 20 bytes

-1 by just defining a variable first instead of using an empty fallback

x=GoodBad
<<<${x/$1}

Try it online! Try it online!

<<<${${[implicit parameter]:-fallback}/pattern[/implicit empty replacement]}

No coreutils, and nearly as good as the Bash+coreutils answer (which is compatible with Zsh).

(e-)TeX, 48 bytes

\read0to~\expanded{\def\##1~{#1}}\#Good Bad \bye

Output is to dvi/pdf file.

APOL, 32 bytes

Just checks if the input starts with "G".

g(["Good" "Bad"] I(=(g(i) "G")))

FALSE, 23 bytes

^'B=$["Good"]?~["Bad"]?

Try it online!

Explanation

The program gets an input character and checks if it is equal to 'B'. If it is, it prints 'Good', and if it isn't it prints 'Bad'. This makes use of the fact that 'Good' and 'Bad' are easily differentiable based on simply the first character of each word.

^                  {Get input character}
'B=                {See if input char is equal to 'B'}
["Good"]?~["Bad"]? {If top of stack is TRUE, print "Good", else print "Bad"}

Note: Curly brackets denote comments in FALSE. In the past I've used '//' to comment FALSE code in my explanations, but since it isn't syntactically valid I'm now trying to use FALSE's comment syntax.

Vyxal r, 7 bytes

`ƛ⁋«Ṫ`-

Try it Online!

This is irony in a nutshell.

Explained

`...`-
`...`  # the string "GoodBad"
     - # ^ - input (removes it)

In the spirit of my Keg answer, here's the compiled code:

global stack, register, printed, output, MAP_START, MAP_OFFSET, _join, _vertical_join, use_encoding, input_level, raw_strings, retain_items, reverse_args, this_function
stack.append("GoodBad")

rhs, lhs = pop(stack, 2); stack.append(subtract(lhs, rhs))

Javascript 50 bytes

alert((305786-parseInt(prompt(),26)).toString(26))

Retina, 10 bytes

:`GoodBad

Try it online!

: swaps the input and the regex, so this computes 'GoodBad'.replace(input, '').

MAWP, 59 bytes

%|~88W7MA{88W7M;99W65WM!;;25W25WW;}<88W2M;99W44WM;25W25WW;>

Try it!

Kotlin, 52 bytes

fun main()=print("GoodBad".replace(readLine()!!,""))

Try it online!

W j, 8 bytes

Still doesn't tie with Keg. Help!

♥d←╖←I¡%

Uncompressed:

G'%Av%?S,

Explanation

           % Implcitly start a compressed string
G'         % "good" in the dictionary
  %        % Capitalize
   Av      % "bad" in the dictionary
     %     % Capitalize
      ?    % End compressed string
       S   % Swap so that the input comes to the top
        ,  % Split the string on the input

Flag:j     % Implicit smash on output list
```

Whitespace, 114 104 103 bytes

(much whitespace)

Try it online!

-5 bytes thanks to Jo King.

-5 bytes by determining if the input is odd or even instead of subtracting "B"

-1 byte thanks to Kevin Cruijssen by using the initial 3 as address for reading characters

sssttl      push "d"
sls         dup (address for "retrieve")
sls         dup (address for "readc")
tlts        readc
ttt         retrieve
ssstsl      push 2
tstt        mod (determine if input is even or odd)
ltssl       jz good
sssl        push "a"
ssttttttl   push "B"
lsll        jmp print
lsssl       lbl good
ssstttsl    push "o"
sls         dup
sstttstsl   push "G"

lssl        lbl print
sssttsssstl 97
tsss        add
tlss        printc
lsll        jmp print

W d, 12 11 9 bytes

Realized that I could use the implicit quote system. Still can't beat Keg with the decompression. (Alternative 9-byter:§D⑺y⒁v⑼z¬; but that's the same bytecount)

☺DΩy±v∞z↓

Explanation

% Sample input: "Bad"
% Implicitly prepend a quote for this string
GooBa"     % Stack: ["Bad","GooBa"]
      S    % Stack: ["GooBa","Bad"]
       t   % "GooBa".trim("Bad"), which is "Goo"
        'd % Stack: ["Goo","d"]
           % Stack: ["Good"]

% Implicit output
```

TI-BASIC, 38 bytes

Input Str1:"GoodBad 
sub(Ans,abs(inString(Ans,Str1)-5)+1,4

Prompts the user to input the string, then prints the other string as specified in the challenge.

Explanation:

Input Str1                               ;get the input
"GoodBad "                               ;leave "GoodBad " in Ans. closing quote
                                         ;  is added for clarity (isn't in program)
            inString(Ans,Str1)           ;get the 1-indexed position of the input
                                         ;  in "GoodBad "
        abs(                  -5)+1      ;subtract 5, get the absolute value,
                                         ;  then add 1
sub(Ans, ...                       ,4    ;get the substring of "GoodBad " starting
                                         ;  at the position just calculated with
                                         ;  a length of 4.  leave the result in Ans
                                         ;implicit print of Ans

naz, 66 bytes

9a7m4a2x1v1x1f1r3x1v2l5s1o2d3m2s1o3a1o0x1x2f5a1o2d3m6a2o9s2s1o0x1f

Explanation (with 0x commands removed)

9a7m4a2x1v                   # Set variable 1 equal to 67 ("C")
1x1f                         # Function 1
    1r3x1v2l                 # Read the first byte of input
                             # Jump to function 2 if it's less than variable 1 
            5s1o2d3m2s1o3a1o # Otherwise, output "Bad"

1x2f5a1o2d3m6a2o9s2s1o       # Function 2
                             # Output "Good"
1f                           # Call function 1

GolfScript, 11 bytes

"GoodBad"\/

Try it online!

Explanation

"GoodBad"   # Define the lookup table "GoodBad"
         \  # Swap the input so that it can be used by /
          / # Split the lookup table by occurences of the input
            # Implicit print, smashing

Charcoal, 13 bytes

¿⁻LS³Ba¦Goo¦d

Try it online!

Explanation:

¿⁻LS³          If length of input minus 3 is truthy:
      Ba¦         print Ba
         Goo¦       else print Goo
             d        print d

Shakespeare Programming Language, 582 bytes

(Whitespace added for readability)

G.Ajax,.Puck,.Act I:.Scene I:.[Enter Ajax and Puck]Ajax:
Open mind.Be you nicer the sum ofa big cat the cube ofa big big cat?If solet usScene V.
You is the sum ofthe sum ofyou a big big cat a cat.Speak thy.You is the sum ofyou twice twice twice the sum ofa big big cat a cat.Speak thy.Speak thy.You is the square oftwice the sum ofa big big cat a cat.Let usScene X.
Scene V:.Ajax:
You is the sum ofthe sum ofyou a big big pig a pig.Speak thy.You is the sum ofyou the sum ofa big big big big big cat a pig.Speak thy.You is the sum ofyou the sum ofa big cat a cat.
Scene X:.Ajax:Speak thy.

Try it online!

I get the first letter of the input with Open mind. Then I need to determine what it is. Of all the numbers between B=66 and G=71, my brute forcer says 66 is the shortest to write (the sum ofa big cat the cube ofa big big cat), so I compare the first letter of the input to 66. Scene I continues to print Good, or Scene V prints Bad.

C# (Visual C# Interactive Compiler), 30 bytes

Write(Read()>'B'?"Bad":"Good")

Try it online!

Keg, -rt 20 17 15 13 8 7 bytes (SBCS)

-᠀‘5ƳP↫

Transpiles to:

from KegLib import *
from Stackd import Stack
stack = Stack()
printed = False
iterable(stack, 'GoodBad')
string_input(stack)
maths(stack, '-')

if not printed:
    printing = ""
    for item in stack:
        if type(item) in [str, Stack]:
            printing += str(item)
        elif type(item) == Coherse.char:
            printing += item.v

        elif item < 10 or item > 256:
            printing += str(item)
        else:
            printing += chr(item)
    print(printing)

It's a port of the 05AB1E answer. Essentially, it:

Answer History

?G=[øBad|ø‘5Ƴ

Transpiles to the following:

from KegLib import *
from Stackd import Stack
stack = Stack()
printed = False
Input(stack)
character(stack, 'G')
comparative(stack, '=')
if bool(stack.pop()):
    empty(stack)
    character(stack, 'B')
    character(stack, 'a')
    character(stack, 'd')

else:
    empty(stack)
    iterable(stack, 'Good')

if not printed:
    printing = ""
    for item in stack:
        if type(item) is Stack:
            printing += str(item)

        elif type(item) is str:
            printing += custom_format(item)
        elif type(item) == Coherse.char:
            printing += item.v

        elif item < 10 or item > 256:
            printing += str(item)
        else:
            printing += chr(item)
    print(printing)

Explanation

?G=[øBad|ø‘5Ƴ

?            #Get input from user
 G=          #If the first letter is "G"
   [øBad     #Clear the stack and push "Bad"
        |    #Else,
         ø‘5Ƴ#Clear the stack and push the compressed string "Good"

Pushy, 17 bytes

.F`Goo`x?c`Ba`;H"

Try it online!

Explanation:

                  \ Implicit: input on main stack.
.F                \ Pop last letter, and move to auxiliary stack.
  `Goo`           \ Push 'Goo' to main stack.
       x?     ;   \ If the stacks are equal:
         c`Ba`    \    Replace 'Goo' with 'Ba'
               H  \ Push 'd', as char(d) = 100 = H
                " \ Print stack

Wren, 30 bytes

Fn.new{|x|"GooBa".trim(x)+"d"}

Try it online!

Explanation

Fn.new{|x|                   } // New anonymous function with parameter x
                               // Sample input: "Bad"
          "GooBa"              // Define a string
                 .trim(x)      // Trim out all characters in the input string
                               // "GooBa" - "Bad" = "Goo"
                         +"d"  // Return the string joined with a "d": "Good"

sed, 21 16 13 bytes

Thanks @Cowsquack for the hints.

/B/cGood
cBad

Try it online! Try it online! Try it online!

TIL c will short-circuit the current line's parsing.

GNU Smalltalk, 34B

Please forgive me for submitting a code snippet if Smalltalk does have input. I am a complete novice to Smalltalk.

i<'C'ifTrue:['Good']ifFalse:['Bad']

You replace the name i with the intended input.

PHP, 31 bytes

readline()=="Bad"?"Good":"Bad";

Try it online!

Another way, 41 bytes

["Bad"=>"Good","Good"=>"Bad"][readline()];

Try it online!

Extended BrainFuck: 29 28

,>,,,[>|"Bad">>]<[>|"Good">]

-1 bytes thanks to @JoKing

The compiled bf code can run on an interpreter that expects stream end after the last letter and a interpreter that uses 0 as the EOF value. eg. bf -n or beef. eg

> bf ebf.bf < GoodBad.ebf > GoodBad.bf
> echo Bad | bf -n GoodBad.bf
Good
> echo Good | bf -n GoodBad.bf
Bad

Java (OpenJDK 8), 51 42 bytes

g->{if(g=="Bad")return"Good";return"Bad";}

Try it online!

Checks if input is Bad.

-9 to @JoKing

33, 20 bytes

Itj71m"Good"'Bad'ntp

I don't have it on TIO yet, I'll update this when I do.

Explanation:

It                   | Get input
  j71m           n   | If the first character is 'G'
      "Good"       p | - Print "Good"
            'Bad' tp | Else, print "Bad"

ScPL, 61 bytes

ChooseFromMenu''[Good Bad]
Case
Text'Bad'
Case
Text'Good'
End

Editor Link

The first argument to ChooseFromMenu is the title, which doesn't matter so we put an empty string. The second argument is the list of choices.

Cases do not require a label, they go based on order.

Seperators between things are only required when they are not seperated some other way, for example a b needs a space because ab is one argument, but a'b' does not because the ' starts another argument.

Boolfuck, 110 68 bytes

,+;+[;+;;;;+;+;+;<;]>+;;[+;;;+;+;+;;;;+;+;;+;+;;;;+];+;;+;;;+;+;;+;;

Thanks to Jo King for the massively improved solution!

Try it with Online!

Boolfuck, 47 bytes

+>,+;>,;,+;>;;;+;+;+[;<;;;,;+;;+;<];;+;+;;+;;+;

Try it online!

Uses the fact that you can basically just take in the input as bits and then invert certain bits to turn it into the opposite letter.

Explanation:

+>,+;>,;,+;>;;;+;+;+    Print the first letter by inverting the first and third bits of the input
                        'B' = 01000010
                        'G' = 11100010
                        This leaves the tape as
                            1 1 1 1' in the case of Bad
                            1 0 0 1' in the case of Good
                        By making the center cells the inverted bits
[;<;;;,;+;;+;<]         Print the center letters by looping over the two pairs of cells
                        0 1' results in 'a' = 10000110
                        1 1' results in 'o' = 11110110 by printing the 1 in the 2-4th places
                        1 1 1 1' loops twice, while 1 0 0 1' only loops once
;;+;+;;+;;+;            Finally print 'd' = 00100110

Zozotez: 22

(?(=(r)'Bad)'Good'Bad)

Pepe, 104 bytes

rEEeREeEeeeEEErrEEreeEeeeEEEreeEEeEEEEreeEEeEEEEreeEEeeEeeREerREEreeEeeeeEereeEEeeeeEreeEEeeEeeREeReEree

Try it online!

With comments

# Prepare stacks
rEEe        # r ← Input
REeEeeeEEE  # R ← 'G'

# Create label i (outputs "Good")
rrEE { reeEeeeEEE reeEEeEEEE reeEEeEEEE reeEEeeEee } REe 

# Create label 'G' (outputs "Bad")
rREE { reeEeeeeEe reeEEeeeeE reeEEeeEee } REe 

# Compare values
ReE  # If the first letter of input is 'G', go to label 'G'
ree  # Otherwise, go to label i

brainfuck, 52 bytes

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

Try it online!

Relies on Bad being one letter shorter than Good, so the last input is empty.

Explanation:

,>,,<<,       Get input into the first three cells
[             If the last letter was not empty (i.e. Good)
 >-----.      Decrement 'G' to 'B' and print
 <---.        Decrement 'd' to 'a' and print
 +++.         Increment back to 'd' and print
>>]           End loop
>[            If it is Bad instead
 +++++.       Increment 'B' to 'G' and print
 +[-<-->]<-.. Manipulate into  'o' and print twice
 >>.          Print 'd'
>]            End loop

Racket, 38 bytes

(write(match(read)['Bad'Good][_'Bad]))

Underload, 26 25 16 bytes

(Bad)(Good)Bad^S

Since Underload has no input instructions, input is hard-coded (The ‘Bad’ on the right).

Really proud of this one: Underload has no way to check strings, so I had to go off of the fact the ‘Bad’ contains an a, which is an instruction that puts brackets around the top thing in the stack.

Edit: Saved 9 bytes over my old one by getting rid of 2 pairs of brackets, only using one S and getting rid of some !s and ^s

Try it with Bad!

Try it with Good!

Keg, 22 bytes

?^_^_o=[^aB^_|^ooG^]

PowerShell, 22 20 bytes

'Good','Bad'-ne$args

Try it online!

-2 bytes thanks to mazzy

R, 42 37 35 32 bytes

-10 thanks to Giuseppe and AkselA!

`if`(scan(,'')>'C','Bad','Good')

Try it online!

Turing Machine But Way Worse, 405 bytes

0 0 0 1 1 0 0
1 1 1 1 2 0 0
0 2 0 1 3 0 0
0 3 0 1 4 0 0
0 4 0 1 5 0 0
1 5 0 1 6 0 0
0 5 1 1 h 0 0
1 6 1 1 7 0 0
1 7 0 1 8 1 0
0 8 0 1 9 0 0
1 9 1 1 9 0 0
0 9 0 1 a 0 0
1 a 0 1 a 0 0
0 a 0 0 b 0 0
0 b 1 1 c 1 0
0 c 0 0 d 0 0
1 d 0 0 e 0 0
0 e 0 0 f 0 0
0 f 1 1 g 1 1
1 h 1 1 i 0 0
0 i 1 1 j 1 0
0 j 0 1 k 0 0
1 k 1 1 k 0 0
0 k 0 1 l 0 0
0 l 1 1 l 0 0
1 l 1 0 m 1 0
1 m 1 1 n 1 0
1 n 1 1 o 0 0
0 o 0 1 p 1 1

Try it online!

Well, this took a while.

UNFINISHED EXPLANATION:

0 0 0 1 1 0 0 Start going to the sixth bit
1 1 1 1 2 0 0
0 2 0 1 3 0 0
0 3 0 1 4 0 0
0 4 0 1 5 0 0 End going to the sixth bit
1 5 0 1 6 0 0 If the sixth bit is 1, then it is Good. Start transforming "G" to "B" and go to state 6
0 5 1 1 h 0 0 Else, it is Bad. Start transforming "B" to "G" and go to state h
1 6 1 1 7 0 0 Keep on transforming "G" to "B"
1 7 0 1 8 1 0 End transforming and print "B"
0 8 0 1 9 0 0 We are in the first "o" in "Good". Start moving into the 5th bit.
1 9 1 1 9 0 0
0 9 0 1 a 0 0
1 a 0 1 a 0 0 Do some looping magic and start transforming "o" to "a"
0 a 0 0 b 0 0 End looping magic
0 b 1 1 c 1 0 End transforming and print "a"
0 c 0 0 d 0 0 
1 d 0 0 e 0 0 Start transforming "a" to "d"
0 e 0 0 f 0 0 
0 f 1 1 g 1 1 Stop transforming, print "d", and terminate
1 h 1 1 i 0 0 Continue transforming "B" to "G"
0 i 1 1 j 1 0 Stop transforming and print out "G"
0 j 0 1 k 0 0 Start going into position to print out "oo"
1 k 1 1 k 0 0
0 k 0 1 l 0 0 Move more efficiently using LOOPING MAGIC1!1111111 
0 l 1 1 l 0 0 looping magic end, start transforming
1 l 1 0 m 1 0 end transforming and print out out "o"
1 m 1 1 n 1 0 print out "o" again
1 n 1 1 o 0 0 get into the "d" byte
0 o 0 1 p 1 1 print "d" and execute YOU HAVE BEEN TERMINATED

Dart, 77 bytes

import'dart:io';main()=>print('BadGood'.replaceAll(stdin.readLineSync(),''));

Try it online!

Ruby, 30 28 bytes

puts %w|Good Bad|-gets.split

Not the golf-iest, but I like the abuse of split to remove the trailing newline and convert to an array in one call.

EDIT -2 bytes thanks to Value Ink's suggestion!

Jelly, 8 bytes

“Ċ³ṫ³»œṣ

Try it online!

A full program expecting a Python formatted string as an argument

How?

“Ċ³ṫ³»œṣ - Main Link: list of characters, S
“Ċ³ṫ³»   - compression of dictionary words "Good"+"Bad" = ['G','o','o','d','B','a','d']
      œṣ - split on sublists equal to S
         - implicit, smashing print

Jelly, 9 bytes

“GooBa”œ^

Try it online!

Explanation

Multiset symmetric difference between the input and the string “GooBa”.

Java (JDK), 124 bytes

interface G{static void main(String[]a){System.out.print(new java.util.Scanner(System.in).next().length()>3?"Bad":"Good");}}

Try it online!

Most likely, there‘s still some room for improvement, but I‘m entirely new to code golfing.

Python 3, 37 bytes

print(['Bad','Good'][input()=='Bad'])

Try it online!

Python 3,  32  31 bytes

exit('GBoaodd'['G'<input()::2])

Try it online!

How?

Tests if input is 'Good' by comparing 'G'<input().

Uses the fact that in Python False==0 and True==1 to use the result as the start index of a slice of 'GBoaodd' using an undefined stop and a step of 2 with 'GBoaodd'[start:stop:step].

Prints to STDERR (saving a byte with exit in place of print).

brainfuck, 72 bytes

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

Try it online!

Explanation: ,>+++++>,>,>,>,

Read either: "G", 5, "o", "o", "d" or "B", 5, "a", "d", 0

[<<<<[-<->>---<]<.>>+.>>.>>>] If the last character is not zero:

Substract 5 from the first cell once and from the third cell thrice. Increment cell 3

Output cells 1, 3, 5.

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

Otherwise add 5 to the first cell once and to the third cell thrice.

Decrement cell 3

Output cells 1, 3, 3, 4

8088 Assembly, IBM PC DOS, 25 bytes

Unassembled:

BA 0110     MOV  DX, OFFSET GB  ; point DX to 'Good','Bad' string 
D1 EE       SHR  SI, 1          ; point SI to DOS PSP (80H) 
02 04       ADD  AL, [SI]       ; add input string length to AL, set parity flag 
7B 02       JNP  DISP           ; if odd parity, input was 'Bad' so jump to display 'Good'
02 D0       ADD  DL, AL         ; otherwise add string length as offset for 'Bad' string 
        DISP: 
B4 09       MOV  AH, 9          ; DOS display string function 
CD 21       INT  21H            ; call DOS API, write string to console 
C3          RET                 ; return to DOS 
        GB  DB  'Good$','Bad$'

Explanation:

Looks at the length of input string (plus leading space) that DOS stores at memory address 80H, and adds it to AL (initially 0 by DOS). If there is an odd number of 1 bits in the binary representation of the string length, the CPU parity flag is set to odd, and vice-versa. So input string ' Bad' length 4 (0000 0100), is odd parity and input string ' Good' is 5 (0000 0101) is even parity.

DX is initially set to point to the string 'Good$Bad$', and if parity is even (meaning input was ' Good') advance the string pointer by that length (5) so it now points to 'Bad$'. If parity is odd, do nothing since it already points to 'Good$'. Then use DOS API to display a $ terminated string to console.

Example:

enter image description here

Download and test GOODBAD.COM or build from xxd dump:

0000000: ba10 01d1 ee02 047b 0202 d0b4 09cd 21c3  .......{......!.
0000010: 476f 6f64 2442 6164 24                   Good$Bad$

PHP, 26 23 bytes

A ternary is just cheaper:

<?=$argn==Bad?Goo:Ba?>d

Try it online!

Original answer, 26 bytes

<?=[Ba,Goo][$argn==Bad]?>d

Try it online!

Or 21 bytes (but this is basically Arnauld's answer)

<?=$argn[3]?Ba:Goo?>d

Try it online!

Sinclair ZX80 BASIC (4K ROM) - 46 tokenized BASIC bytes

 1 INPUT A$
 2 IF A$="GOOD" THEN PRINT "BAD"
 3 IF A$="BAD" THEN PRINT "GOOD"

Sinclair ZX81 BASIC (Also Timex TS 1000/1500 or ZX80 with 8K ROM upgrade) - 45 tokenized BASIC bytes

 1 INPUT A$
 2 PRINT "GOOD" AND A$="BAD";"BAD" AND A$="GOOD"

Runic Enchantments, 21 bytes

"Bad":i≠7*?~"Good"@

Try it online!

Prints Good when the input is Bad and prints Bad for all other inputs.

F# (.NET Core), 50 35 bytes

Down to 35 thanks to @Expired Data

 fun a->if a>"B"then"Bad"else"Good"

Try it online!

Original:

F# (.NET Core), 50 bytes

printf(if stdin.ReadLine()>"B"then"Bad"else"Good")

Try it online!

Japt -P, 11 bytes

"GoodBad"qU

Try it

Explanation:

"GoodBad"qU     U = Input             "Good"        "Bad"
"GoodBad"       String literal        "GoodBad"     "GoodBad"
         qU     Split at U            ["","Bad"]    ["Good",""]
-P              Join into a string    "Bad"         "Good"

Alternative

"GoodBad"rU

r replaces U with ""

Try it

Windows batch, 53 48 47 bytes

-1 bytes, thanks to @Neil for noticing the trivialness of the space before else.

set/pa=
if %a%==Bad (echo Good)else (echo Bad)

set/pa= prompt for input and set a to that input

if %a%==Bad (echo Good)else (echo Bad) antonym for Good and Bad. Unfortunately Windows batch requires whitespace...

Pyth, 12 bytes

+-"GooBa"z\d

Try it online!

+-"GooBa"z\d   Implicit: z=input()
 -"GooBa"z     Keep letters in "GooBa" which do not appear in z
+         \d   Append "d", implicit print

05AB1E, 10 9 bytes

”‚¿‰±”áIK

-1 byte thanks to @Emigna.

Try it online or verify both test cases.

Explanation:

”‚¿‰±”     # Push dictionary string "Good Bad"
      á    # Only keep letters (to remove the space)
       IK  # Remove the input
           # (output the result implicitly)

See this 05AB1E tip of mine (section How to use the dictionary?), to understand why ”‚¿‰±” is "Good Bad".

Excel, 24 bytes

=IF(A1>"C","Bad","Good")

Using @MilkyWay90's <C suggestion.

Ruby, 22 bytes

->n{n>?F?"Bad":"Good"}

Try it online!

Python 3, 33 bytes

exit(['Bad','Good'][input()<'G'])

Try it online!

 

Prints to stderr, to save one byte over print().

Befunge-93, 20 18 bytes

"BadooGB"~-_#@,,<,

Try it online!

-2 bytes thanks to Jo King

Python 2, 32 bytes

print('Good','Bad')['C'<input()]

Try it online!

Using exit requires extra brackets around the whole expression so in this case print is 1 byte shorter.

JavaScript 31 bytes

I like Arnauld's answer, but I would like it to accept user input and be runnable on StackExchange like so:

alert(prompt()[3]?'Bad':'Good')

APL (Dyalog Unicode), 13 bytesSBCS

Full program that prompts for input from stdin and prints to stdout.

'GooBad'~¯1↓⍞

Try it online!

 prompt for input from stdin; Good or Bad

¯1↓ drop the last character (d); Goo or Ba

'GooBad'~ multiset subtract those characters from these; Bad or Good

Perl 5 -p, 15 bytes

$_=/B/?Good:Bad

Try it online!

C, 39 38 bytes

main(){puts("Good\0Bad"+getchar()%6);}

Try it online!

Saved one byte thanks to @tsh.

Python 3, 38 37 34 33 bytes

exit("C">input()and"Good"or"Bad")

Try it online!

exit() : returns an exit code as output

"C">input() : Checks whether the input is larger than the string C in the alphabetical order

and"Good" : If the result is True, then returns with Good

or"Bad" : Otherwise, returns with Bad

///, 23 bytes

/#Good/Bad//#Bad/Good/#

Try it online!

There is no other way to take input in /// so it is hard-coded:

/#Good/Bad//#Bad/Good/#<INPUT HERE>

My shortest possible solution in Python (43 bytes)

print({'Good':'Bad','Bad':'Good'}[input()])

And MilkyWay90 further golfed version (-2 bytes)

print({'G':'Bad','B':'Good'}[input()[0]])

Java, 30 bytes

s->s.charAt(0)>66?"Bad":"Good"

TIO

Attache, 24 bytes

$Good'$Bad^^Stdin[]|Echo

Try it online!

Explanation

$Good'$Bad^^Stdin[]|Echo
$Good'$Bad                   an array of the strings "Good" and "Bad"
          ^^                 remove from this array
            Stdin[]          standard input
                             this leaves us with a singleton array of the swapped element
                   |Echo     pipe the Echo function to each member of this array
                             (in this case, only prints the one element)

Alternatives

25 bytes: $Good'$Bad⩓Stdin[]|Echo

26 bytes: [$Good,$Bad]^^Stdin[]|Echo

29 bytes: Echo@If[Stdin[]@3,$Bad,$Good]

29 bytes: Echo@[$Bad,$Good][Stdin[]<$G]

37 bytes: [4875396,32943]^^STN@Stdin[]|Echo@NTS

44 bytes: Good:=$Bad;Bad:=$Good;Print@EvalHere@Stdin[]

C# (Visual C# Interactive Compiler), 23 bytes

a=>a[0]>66?"Bad":"Good"

Try it online!

Wolfram Language (Mathematica), 48 44 38 bytes

If[$ScriptInputString=="Bad",Good,Bad]

Try it online!

-4 bytes thanks to Jonathan Allan: using symbols instead of strings as output

-6 bytes by removing Print@, which is implicit in the command-line version of WolframScript and can be simulated on TIO with the -print argument

Stax, 9 8 bytes

çEF♫a║▬h

Run and debug it

Essentially replace("BadGood", input, "").

Multiset xor with "GooBa". Algorithm copied verbatim from Luis Mendo

K (oK), 16 bytes

Solution:

$`Bad`Good"Bad"~

Try it online!

Returns "Good" if input is "Bad" otherwise returns "Bad" for all other inputs.

Haskell, 36 34 bytes

interact g
g"Bad"="Good"
g _="Bad"

Try it online!

Edit: -2 bytes thanks to @cole

bash, 20 bytes

sed s/$1//<<<GoodBad

Try it online!

Retina 0.8.2, 20 bytes

oo
o
T`G\oaB`Ro
o
oo

Try it online! Link includes test suite. Explanation:

oo
o

Turn Good into God.

T`G\oaB`Ro

Transpose the letters GoaB with the reverse of that list, thus exchanging G with B and o with a, i.e. exchanging God with Bad.

o
oo

Turn God into Good.