human
What is a code to 1984 and the other steps required given the following:
1984
by Katerina Zoltan
The place: Airstrip One. The reason: thoughtcrime. The time: ???
John's parents were taken by the Thought Police and erased from all records. John is being initiated into the Youth League and must pass a test. He is asked whether his parents are good comrades. It is not clear what John's admission officer knows:

He may know that John's parents have been erased and that John did not give them away.
He may know only that John's parents have been erased.
He may not know that John's parents have been erased.

It is a well known fact that children who have parents that are 'good comrades' have twice the chances of passing the test. However, if the admission officer knows that their parents committed thoughtcrime (but not that they have been erased yet), a child that gave his parents away has three times the chances of getting in than a child who did not give them away.
And if the admission officer knows the specifics of the arrest, a child that denies that the records are false and their parents existed has a 1/3 chance of getting in, while one who pretends that his parents never existed has a 2/3 chance. Lying to an admission officer that knows the parents have been erased will ensure that the child does not get in. Telling an admission officer that your parents do not exist when he does not know this will give you a 1/3 chance of getting in.
There is a 60% chance the admission officer knows nothing, a 25% chance that he knows the parents have been erased, and a 15% chance that the officer knows all of the details. John says that he never had parents and is admitted into the Youth League. What did his admission officer know?"
Please write code following the instructions in jupyter notebook style.
assistant
#Here is code to 1984 and the other steps required.

# Solution

officer = {'everything':0.15, 'something':0.25, 'nothing':0.6}

class ThoughtPolice(Suite):

    def Likelihood(self, data, hypo):
        if data == 'gave away':
            if hypo == 'everything':
                return 0
            elif hypo == 'something':
                return 1
            else:
                return 3
        elif data == 'none':
            if hypo == 'everything':
                return 2
            elif hypo == 'something':
                return 1
            else:
                return 1
        else: # data == 'good comrades'
            if hypo == 'everything':
                return 0
            elif hypo == 'something':
                return 0
            else:
                return 2
        
pmf = ThoughtPolice(officer)
pmf.Print()

# Solution

pmf.Update('none')
pmf.Print()