I am making a real time project for which I need some help

I am trying to make a queue system in which I have written a code that is working fine but that code is just a one-time flow i.e. you run once and then you get the output.

But I want to make it as a real-time application that would take request and give output to the user’s input and this should function should run parallelly.

So currently, I have coded it in python and I have a very vague knowledge of how real-time application works. So, I would be glad if someone could help me through it.

I’m a beginner myself but creating a main loop sounds like it would work for you.

def main():
    a = input("Enter a number or type exit to exit ")
    if a =="exit":
        b = int(input("Enter another number "))
        c = int(a) * b
print("Welcome to the most useless calculator in the world")

what this does is when it has run through your code in this case printed c it calls the main function again, this creates and infinite loop untill you type exit wich then closes the app.

Hope this makes sence.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add backticks around text.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (’).