With few lines of codes, you can build an IDLE or interactive prompt using the continuous input mechanism



After configuration, you can use it to do calculations etc.

Here is the code :

while 1 :

    c=input(‘>>> ‘)

    if c == ‘hi’ :


euhh too simple? But that’s the basic.

while 1  means while true. you can replace the 1 by the word true. sane thing. it is an infinite loop.