We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Quine machine

From Esolang
Jump to navigation Jump to search

Quine machine is a program form made by Assembly.

Overview

A quine machine does like this:

  1. Receive user input.
  2. If user input is 0, output the source code.
  3. If user input is 1, output 1 infinitely.
  4. Otherwise, output the user input once.

Quine machine challenge area

The Second Wallahi

i = input()
if i == 0:
  while True:
    print(1)
elif i == 1:
  print(quine())
else:
  print(i)