Computer Science, asked by swaroopsunil3898, 1 year ago

When using the python shell and code block, what triggers the interpreter to begin evaluating a block of code?

Answers

Answered by BushrajavediqbalKhan
0

Explanation:

if currentIndent = currentBlock.indent then

  parse line in the context of currentBlock

else if currentIndent > currentBlock.indent then

  create sub-block of currentBlock and parse line in that context

else finish currentBlock and run this same comparison on currentBlock.parent

Answered by nidaeamann
0

Explanation:

A code block is a piece of Python program text that can be executed as a unit, such as a module, a class definition or a function body. It can be called once or even multiple times, even a code block can be called within a code block.

Execution of code block takes place in an execution frame. It contains some administrative information to know from where to execute the code block and how to return back to the main code.

It is triggered whenever a particular code block is called.

Examlpe;

def time:

………..

Return mins

Main

Time_min = time():

Similar questions