title: How to create a shell program that accepts commands and prints a "$" prompt to indicate that a user can input a command using a while loop?
body: <p>I'm a beginner Python coder and I'm very unsure on how to create a simple shell program that accepts commands (ex. printrecipes, printinventory, load etc.)</p>
  
  <p>The input should look like:</p>
  
  <p>$ loadrecipes </p>
  
  <p>$ printmoney()</p>
  
  <p>20</p>
  
  <p>For this shell, I'm trying to use a while loop so it continues through the program without crashing even if they input a command that is acceptable.</p>
  
  <pre class="lang-py prettyprint-override"><code>def handle_commands():
      keep_going=True
      command=input("$" + " ")
      while keep_going:
          if command == '$ quit':
              keep_going = False
              break
          elif command == "$ loadrecipefile(recipe_file)"
              j
          elif command == "$ printrecipes":
              printrecipes()
          elif command == "$ printiinventory":
              printiinventory()
          elif command == "$ printmoney":
              printmoney()
          elif command == "$ buyingredient":
  </code></pre>
  
  <p>I have no idea what to go from here. 
  The commands are that loadrecipes(recipe_file) takes in one argument, all print commands don't take an argument, buyingredient(ingredient_name, number:int) takes in 2 arguments (the ingredient name and how many of those ingredients).</p>
  
  <p>So, for each command I have created a function in correspondence. Such as for printiinventory() I have:</p>
  
  <pre class="lang-py prettyprint-override"><code>def printiinventory():
    print(iinventory['apple'],iinventory['beets'],iinventory['carrots'])
  </code></pre>
  
  <p>so if the command is:</p>
  
  <p>$ printiinventory</p>
  
  <p>0 4 3</p>
  
  <p>it should come out to be like this</p>