16
8
Challenge Description:
Write a program that asks the user for input. The user will enter Good
or Bad
. You do not have to support any other input. If the user enters Good
, print Bad
and vice versa (to stdout etc).
Notes:
1) You cannot use any other pair of two words.
2) Your program only has to ask and print once.
3) You do not need to display prompt string.
4) The output must appear separated from the input by any means.
5) No function is allowed accepting the value and returning the result; User must interact with the program.
Good luck!
9May we write a function that takes input as argument instead of prompting for it? – Adám – 2019-07-07T14:01:39.150
Congratulations on your first challenge. I've removed the [tag:code-challenge] tag, as it is only to be used for indicating alternative scoring criteria (not [tag:code-golf]). I look forward to seeing interesting challenges from you, but consider using the sandbox to design your challenges, at least the first few times.
– Adám – 2019-07-07T14:08:42.8678Please edit your question about whether a function is allowed or not. I would highly recommend not restricting input to STDIN, unless you have a very good reason to (and I can't see one) – Jo King – 2019-07-09T00:21:43.857
2asks the user for input (stdin etc) shows that only STDIN or interactive input is allowed. Please change this to all default I/O methods – MilkyWay90 – 2019-07-09T17:05:35.150
1"Asks the user for input", should that be some explicit question? Because an empty CLI prompt isn't really asking for anything … – user0721090601 – 2019-07-10T13:23:22.457
5What is the purpose for this restriction? No function is allowed accepting the value and returning the result; User must interact with the program – mbomb007 – 2019-07-12T13:58:39.473