NameError without a quine: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
Tommyaweosme (talk | contribs) No edit summary |
Tommyaweosme (talk | contribs) No edit summary Tag: Reverted |
||
Line 17: | Line 17: | ||
const code = document.getElementById('code').value; |
const code = document.getElementById('code').value; |
||
if (code == 'Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'[command]\' is not defined'){ |
if (code == 'Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'[command]\' is not defined'){ |
||
return 'Traceback (most recent call first):\n File "<stdin>", line 1, in <module>\nJustAnError: Why did you imitate the NameError?'; |
return 'Traceback (most recent call first):\n File "<<b></b>stdin>", line 1, in <<b></b>module>\nJustAnError: Why did you imitate the NameError?'; |
||
} else { |
} else { |
||
return 'Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'[command]\' is not defined'; |
return 'Traceback (most recent call last):\n File "<<b></b>stdin>", line 1, in <<b></b>module>\nNameError: name \'[command]\' is not defined'; |
||
}; |
}; |
||
}; |
}; |
Revision as of 03:04, 2 July 2025
NameError without a quine is an esolang made by Unname4798. It is similar to NameError, except when you type this:
Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name '[command]' is not defined
It outputs:
Traceback (most recent call first): File "<stdin>", line 1, in <module> JustAnError: Why did you imitate the NameError?
Interpreter
<h1>NameError without a quine Interpreter</h1> <p>Output: <text style="white-space:pre-wrap;" id="output"></text></p> <textarea id="code"></textarea> <button onclick="document.getElementById('output').innerHTML = run()">Submit</button> <script> function run(){ const code = document.getElementById('code').value; if (code == 'Traceback (most recent call last):\n File "<stdin>", line 1, in <module>\nNameError: name \'[command]\' is not defined'){ return 'Traceback (most recent call first):\n File "<<b></b>stdin>", line 1, in <<b></b>module>\nJustAnError: Why did you imitate the NameError?'; } else { return 'Traceback (most recent call last):\n File "<<b></b>stdin>", line 1, in <<b></b>module>\nNameError: name \'[command]\' is not defined'; }; }; </script>