Question: The following problem is not required. However, it is worth 1 5 points of extra credit. 1 . A quine is a computer program which

The following problem is not required. However, it is worth 15 points of extra credit.
1. A quine is a computer program which takes no input(This implies no file input is allowed), yet prints out its source code. The existence of these
programs is a consequence of the Recursion Theorem.
Create a Python program which is a quine. You may use escape characters such as \" and \\ but not special
implementation features such as character codes or pre-defined functions such as repr(), exec(), or %r.
Submit your answer in two parts:
(a) A .py file.
Your submission will be graded via a method similar to:
$ python3 s u b m i s s i o n . py > output
$ d i f f q s u b m i s s i o n . py output && echo Quine !|| echo Not a q u i n e .
(b) A typed paragraph or two describing how you created the program.
Hint: Assign a string S to serve as a template. The substring operation S[i:j] and escaped quotes are useful.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!