<p>Your question wasn't closed as unclear, it was closed as a duplicate. <a href="https://stats.stackexchange.com/questions/593134/conditional-entropy-in-pseudo-code">The duplicate question has the answer to the question you ask</a>, right in the first comment:</p>
<blockquote>
<p>Substitute &quot;H&quot; for &quot;E&quot; in the tower formula for conditional expectation: there's nothing new to memorize.</p>
</blockquote>
<p>This is a complete answer to the new question. If you read further in the comments, we find the term of art &quot;Law of Total Expectation&quot; and a link to a Wikipedia article.</p>
<p>While I did not down-vote this question, it seems to fit the description &quot;This question does not show any research effort.&quot;</p>
