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 points of extra credit.
A quine is a computer program which takes no inputThis 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 predefined 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:
$ python 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 Si:j and escaped quotes are useful.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
